home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / MacTCP / MacTCP Developer Tools / MacTCP LAP Tech Note
MacBinary  |  1995-01-11  |  95.0 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Wed Jan 11 06:00:00 1995, modified Wed Jan 11 06:00:00 1995, creator 'HLX2', type 'ONLN', 93545 bytes "MacTCP LAP Tech Note" , at 0x16de9 3510 bytes resource default (weak)
99% file data default
66% TrID raw Group 3 FAX bitmap default (weak)
33% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 4d 61 63 54 43 50 | 20 4c 41 50 20 54 65 63 |..MacTCP| LAP Tec|
|00000010| 68 20 4e 6f 74 65 00 00 | 00 00 00 00 00 00 00 00 |h Note..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 6d 69 00 | 00 0d b6 ab 39 6a b0 ab |.....mi.|....9j..|
|00000060| 39 6a b0 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |9j......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3e 48 00 00 |........|....>H..|
|00000080| 4d 61 63 54 43 50 20 31 | 2e 30 20 75 73 65 73 20 |MacTCP 1|.0 uses |
|00000090| 4d 50 57 20 43 20 32 2e | 31 20 63 61 6c 6c 69 6e |MPW C 2.|1 callin|
|000000a0| 67 20 63 6f 6e 76 65 6e | 74 69 6f 6e 73 2e 0d 42 |g conven|tions..B|
|000000b0| 75 69 6c 64 69 6e 67 20 | 41 6c 74 65 72 6e 61 74 |uilding |Alternat|
|000000c0| 65 20 4c 69 6e 6b 20 41 | 63 63 65 73 73 0d 50 72 |e Link A|ccess.Pr|
|000000d0| 6f 74 6f 63 6f 6c 20 4d | 6f 64 75 6c 65 73 20 66 |otocol M|odules f|
|000000e0| 6f 72 20 4d 61 63 54 43 | 50 0d 4d 61 63 54 43 50 |or MacTC|P.MacTCP|
|000000f0| 20 76 65 72 73 69 6f 6e | 20 31 2e 31 20 63 6f 6e | version| 1.1 con|
|00000100| 74 61 69 6e 73 20 62 75 | 69 6c 74 2d 69 6e 20 4c |tains bu|ilt-in L|
|00000110| 6f 63 61 6c 54 61 6c 6b | 20 61 6e 64 20 45 74 68 |ocalTalk| and Eth|
|00000120| 65 72 6e 65 74 20 6c 69 | 6e 6b 20 61 63 63 65 73 |ernet li|nk acces|
|00000130| 73 20 70 72 6f 74 6f 63 | 6f 6c 20 28 4c 41 50 29 |s protoc|ol (LAP)|
|00000140| 20 73 75 70 70 6f 72 74 | 2e 20 53 75 70 70 6f 72 | support|. Suppor|
|00000150| 74 20 66 6f 72 20 61 64 | 64 69 74 69 6f 6e 61 6c |t for ad|ditional|
|00000160| 20 4c 41 50 73 20 63 61 | 6e 20 62 65 20 61 64 64 | LAPs ca|n be add|
|00000170| 65 64 20 74 68 72 6f 75 | 67 68 20 68 6f 6f 6b 73 |ed throu|gh hooks|
|00000180| 20 69 6e 20 74 68 65 20 | 4d 61 63 54 43 50 20 64 | in the |MacTCP d|
|00000190| 72 69 76 65 72 73 2e 20 | 54 68 69 73 20 64 6f 63 |rivers. |This doc|
|000001a0| 75 6d 65 6e 74 20 64 65 | 73 63 72 69 62 65 73 20 |ument de|scribes |
|000001b0| 68 6f 77 20 74 6f 20 61 | 64 64 20 61 6c 74 65 72 |how to a|dd alter|
|000001c0| 6e 61 74 65 20 4c 41 50 | 20 6d 6f 64 75 6c 65 73 |nate LAP| modules|
|000001d0| 20 74 6f 20 4d 61 63 54 | 43 50 2e 0d 4e 6f 74 65 | to MacT|CP..Note|
|000001e0| 3a 20 20 41 6c 74 65 72 | 6e 61 74 65 20 4c 41 50 |: Alter|nate LAP|
|000001f0| 20 73 75 70 70 6f 72 74 | 20 69 73 20 6e 6f 74 20 | support| is not |
|00000200| 61 20 74 65 73 74 65 64 | 20 61 6e 64 20 73 75 70 |a tested| and sup|
|00000210| 70 6f 72 74 65 64 20 66 | 65 61 74 75 72 65 20 6f |ported f|eature o|
|00000220| 66 20 4d 61 63 54 43 50 | 20 31 2e 31 2e 20 20 57 |f MacTCP| 1.1. W|
|00000230| 68 69 6c 65 20 77 65 20 | 62 65 6c 69 65 76 65 20 |hile we |believe |
|00000240| 74 68 69 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |this inf|ormation|
|00000250| 20 69 73 20 63 6f 72 72 | 65 63 74 2c 20 41 70 70 | is corr|ect, App|
|00000260| 6c 65 20 69 73 20 6e 6f | 74 20 72 65 73 70 6f 6e |le is no|t respon|
|00000270| 73 69 62 6c 65 20 66 6f | 72 20 74 68 65 20 61 63 |sible fo|r the ac|
|00000280| 63 75 72 61 63 79 20 6f | 66 20 74 68 69 73 20 69 |curacy o|f this i|
|00000290| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 6e 64 20 72 |nformati|on and r|
|000002a0| 65 73 65 72 76 65 73 20 | 74 68 65 20 72 69 67 68 |eserves |the righ|
|000002b0| 74 20 74 6f 20 6d 61 6b | 65 20 69 6e 63 6f 6d 70 |t to mak|e incomp|
|000002c0| 61 74 69 62 6c 65 20 69 | 6e 74 65 72 66 61 63 65 |atible i|nterface|
|000002d0| 20 63 68 61 6e 67 65 73 | 20 75 6e 74 69 6c 20 74 | changes| until t|
|000002e0| 68 65 20 66 69 6e 61 6c | 20 73 70 65 63 69 66 69 |he final| specifi|
|000002f0| 63 61 74 69 6f 6e 20 69 | 73 20 70 75 62 6c 69 73 |cation i|s publis|
|00000300| 68 65 64 2e 0d 52 65 66 | 65 72 65 6e 63 65 73 0d |hed..Ref|erences.|
|00000310| 6e 09 45 74 68 65 72 54 | 61 6c 6b 20 61 6e 64 20 |n.EtherT|alk and |
|00000320| 41 6c 74 65 72 6e 61 74 | 65 20 41 70 70 6c 65 54 |Alternat|e AppleT|
|00000330| 61 6c 6b 20 52 65 66 65 | 72 65 6e 63 65 20 20 28 |alk Refe|rence (|
|00000340| 45 6e 67 69 6e 65 65 72 | 69 6e 67 20 50 61 72 74 |Engineer|ing Part|
|00000350| 20 4e 6f 2e 20 36 35 38 | 38 32 37 39 29 0d 6e 09 | No. 658|8279).n.|
|00000360| 4d 61 63 54 43 50 20 41 | 64 6d 69 6e 69 73 74 72 |MacTCP A|dministr|
|00000370| 61 74 6f 72 d5 73 20 47 | 75 69 64 65 20 20 28 41 |ator.s G|uide (A|
|00000380| 50 44 41 20 4e 6f 2e 20 | 4d 30 32 36 31 4c 4c 2f |PDA No. |M0261LL/|
|00000390| 41 29 0d 6e 09 4d 61 63 | 54 43 50 20 50 72 6f 67 |A).n.Mac|TCP Prog|
|000003a0| 72 61 6d 6d 65 72 d5 73 | 20 47 75 69 64 65 20 20 |rammer.s| Guide |
|000003b0| 28 41 50 44 41 20 4e 6f | 2e 20 4d 30 32 36 31 4c |(APDA No|. M0261L|
|000003c0| 4c 2f 41 29 0d 4f 76 65 | 72 76 69 65 77 20 6f 66 |L/A).Ove|rview of|
|000003d0| 20 4d 61 63 54 43 50 20 | 4f 70 65 72 61 74 69 6f | MacTCP |Operatio|
|000003e0| 6e 0d 4d 61 63 54 43 50 | 20 69 73 20 69 6d 70 6c |n.MacTCP| is impl|
|000003f0| 65 6d 65 6e 74 65 64 20 | 61 73 20 61 20 4d 61 63 |emented |as a Mac|
|00000400| 69 6e 74 6f 73 68 20 64 | 72 69 76 65 72 20 74 68 |intosh d|river th|
|00000410| 61 74 20 6c 6f 61 64 73 | 20 69 74 73 65 6c 66 20 |at loads| itself |
|00000420| 61 74 20 73 79 73 74 65 | 6d 20 73 74 61 72 74 2d |at syste|m start-|
|00000430| 75 70 20 74 69 6d 65 20 | 75 73 69 6e 67 20 61 6e |up time |using an|
|00000440| 20 49 4e 49 54 2d 33 31 | 2e 20 20 4d 61 63 54 43 | INIT-31|. MacTC|
|00000450| 50 20 69 73 20 70 61 72 | 74 69 74 69 6f 6e 65 64 |P is par|titioned|
|00000460| 20 69 6e 74 6f 0d 6e 09 | 61 20 62 61 73 69 63 20 | into.n.|a basic |
|00000470| 64 72 69 76 65 72 20 74 | 68 61 74 20 69 6d 70 6c |driver t|hat impl|
|00000480| 65 6d 65 6e 74 73 20 61 | 6c 6c 20 6f 66 20 49 50 |ements a|ll of IP|
|00000490| 2c 20 49 43 4d 50 2c 20 | 55 44 50 20 61 6e 64 20 |, ICMP, |UDP and |
|000004a0| 54 43 50 0d 6e 09 69 6e | 64 65 70 65 6e 64 65 6e |TCP.n.in|dependen|
|000004b0| 74 6c 79 20 77 72 69 74 | 74 65 6e 20 4c 41 50 20 |tly writ|ten LAP |
|000004c0| 6d 6f 64 75 6c 65 73 20 | 74 68 61 74 20 69 6e 74 |modules |that int|
|000004d0| 65 72 63 6f 6e 6e 65 63 | 74 20 49 50 20 77 69 74 |erconnec|t IP wit|
|000004e0| 68 20 74 68 65 20 6c 69 | 6e 6b 20 64 65 76 69 63 |h the li|nk devic|
|000004f0| 65 20 64 72 69 76 65 72 | 73 0d 41 20 4c 41 50 20 |e driver|s.A LAP |
|00000500| 69 6d 70 6c 65 6d 65 6e | 74 73 20 74 68 65 20 64 |implemen|ts the d|
|00000510| 61 74 61 20 6c 69 6e 6b | 20 6c 61 79 65 72 20 6f |ata link| layer o|
|00000520| 66 20 74 68 65 20 70 72 | 6f 74 6f 63 6f 6c 20 73 |f the pr|otocol s|
|00000530| 74 61 63 6b 20 77 68 69 | 63 68 20 64 65 61 6c 73 |tack whi|ch deals|
|00000540| 20 73 70 65 63 69 66 69 | 63 61 6c 6c 79 20 77 69 | specifi|cally wi|
|00000550| 74 68 20 68 61 72 64 77 | 61 72 65 20 61 64 64 72 |th hardw|are addr|
|00000560| 65 73 73 69 6e 67 20 61 | 6e 64 20 64 61 74 61 20 |essing a|nd data |
|00000570| 65 6e 63 61 70 73 75 6c | 61 74 69 6f 6e 2e 20 20 |encapsul|ation. |
|00000580| 45 74 68 65 72 6e 65 74 | d5 73 20 64 61 74 61 20 |Ethernet|.s data |
|00000590| 6c 69 6e 6b 20 6c 61 79 | 65 72 20 65 6e 63 61 70 |link lay|er encap|
|000005a0| 73 75 6c 61 74 65 73 20 | 74 68 65 20 75 70 70 65 |sulates |the uppe|
|000005b0| 72 20 6c 61 79 65 72 20 | 70 72 6f 74 6f 63 6f 6c |r layer |protocol|
|000005c0| 20 64 61 74 61 20 69 6e | 20 61 6e 20 45 74 68 65 | data in| an Ethe|
|000005d0| 72 6e 65 74 20 70 61 63 | 6b 65 74 20 77 68 69 63 |rnet pac|ket whic|
|000005e0| 68 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 61 20 |h consis|ts of a |
|000005f0| 34 38 2d 62 69 74 20 45 | 74 68 65 72 6e 65 74 20 |48-bit E|thernet |
|00000600| 73 6f 75 72 63 65 2c 20 | 64 65 73 74 69 6e 61 74 |source, |destinat|
|00000610| 69 6f 6e 20 69 64 65 6e | 74 69 66 69 65 72 73 2c |ion iden|tifiers,|
|00000620| 20 61 6e 64 20 74 68 65 | 20 70 61 63 6b 65 74 20 | and the| packet |
|00000630| 74 79 70 65 20 6f 66 20 | 74 68 65 20 64 61 74 61 |type of |the data|
|00000640| 2e 20 20 45 76 65 72 79 | 20 68 61 72 64 77 61 72 |. Every| hardwar|
|00000650| 65 20 6e 65 74 77 6f 72 | 6b 20 69 6e 74 65 72 66 |e networ|k interf|
|00000660| 61 63 65 20 68 61 73 20 | 61 20 73 70 65 63 69 66 |ace has |a specif|
|00000670| 69 63 20 70 72 6f 74 6f | 63 6f 6c 20 66 6f 72 20 |ic proto|col for |
|00000680| 65 6e 63 61 70 73 75 6c | 61 74 69 6e 67 20 74 68 |encapsul|ating th|
|00000690| 65 20 75 70 70 65 72 20 | 6c 61 79 65 72 20 70 72 |e upper |layer pr|
|000006a0| 6f 74 6f 63 6f 6c 20 64 | 61 74 61 2e 0d 49 6e 20 |otocol d|ata..In |
|000006b0| 61 64 64 69 74 69 6f 6e | 20 74 6f 20 65 6e 63 61 |addition| to enca|
|000006c0| 70 73 75 6c 61 74 69 6e | 67 20 64 61 74 61 2c 20 |psulatin|g data, |
|000006d0| 61 20 4d 61 63 54 43 50 | 20 4c 41 50 20 6d 75 73 |a MacTCP| LAP mus|
|000006e0| 74 20 61 6c 73 6f 20 68 | 61 6e 64 6c 65 20 74 68 |t also h|andle th|
|000006f0| 65 20 6c 69 6e 6b 2d 73 | 70 65 63 69 66 69 63 20 |e link-s|pecific |
|00000700| 6d 65 63 68 61 6e 69 73 | 6d 20 66 6f 72 20 63 6f |mechanis|m for co|
|00000710| 6e 76 65 72 74 69 6e 67 | 20 49 50 20 61 64 64 72 |nverting| IP addr|
|00000720| 65 73 73 65 73 20 69 6e | 74 6f 20 6c 69 6e 6b 20 |esses in|to link |
|00000730| 61 64 64 72 65 73 73 65 | 73 20 28 73 75 63 68 20 |addresse|s (such |
|00000740| 61 73 20 41 52 50 20 6f | 6e 20 45 74 68 65 72 6e |as ARP o|n Ethern|
|00000750| 65 74 29 2c 20 6c 69 6e | 6b 2d 73 70 65 63 69 66 |et), lin|k-specif|
|00000760| 69 63 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |ic confi|guration|
|00000770| 20 70 72 6f 63 65 64 75 | 72 65 73 20 28 73 75 63 | procedu|res (suc|
|00000780| 68 20 61 73 20 4b 49 50 | 20 6f 6e 20 4c 6f 63 61 |h as KIP| on Loca|
|00000790| 6c 54 61 6c 6b 29 2c 20 | 61 6e 64 20 61 6e 79 20 |lTalk), |and any |
|000007a0| 6f 74 68 65 72 20 6c 69 | 6e 6b 2d 73 70 65 63 69 |other li|nk-speci|
|000007b0| 66 69 63 20 66 75 6e 63 | 74 69 6f 6e 73 2c 20 73 |fic func|tions, s|
|000007c0| 75 63 68 20 61 73 20 61 | 64 64 72 65 73 73 20 70 |uch as a|ddress p|
|000007d0| 72 6f 62 65 73 20 74 6f | 20 73 75 70 70 6f 72 74 |robes to| support|
|000007e0| 20 4d 61 63 54 43 50 20 | 64 79 6e 61 6d 69 63 20 | MacTCP |dynamic |
|000007f0| 61 64 64 72 65 73 73 20 | 61 63 71 75 69 73 69 74 |address |acquisit|
|00000800| 69 6f 6e 2e 0d 4d 61 63 | 54 43 50 20 69 73 20 70 |ion..Mac|TCP is p|
|00000810| 72 6f 76 69 64 65 64 20 | 77 69 74 68 20 4c 6f 63 |rovided |with Loc|
|00000820| 61 6c 54 61 6c 6b 20 61 | 6e 64 20 45 74 68 65 72 |alTalk a|nd Ether|
|00000830| 6e 65 74 20 6c 69 6e 6b | 20 6c 61 79 65 72 20 69 |net link| layer i|
|00000840| 6e 74 65 72 66 61 63 65 | 73 2e 20 20 4f 74 68 65 |nterface|s. Othe|
|00000850| 72 20 6c 69 6e 6b 20 6c | 61 79 65 72 20 70 72 6f |r link l|ayer pro|
|00000860| 74 6f 63 6f 6c 73 20 74 | 68 61 74 20 61 72 65 20 |tocols t|hat are |
|00000870| 75 73 65 64 20 69 6e 20 | 74 68 65 20 54 43 50 2f |used in |the TCP/|
|00000880| 49 50 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 69 |IP envir|onment i|
|00000890| 6e 63 6c 75 64 65 20 74 | 6f 6b 65 6e 20 72 69 6e |nclude t|oken rin|
|000008a0| 67 2c 20 73 65 72 69 61 | 6c 20 6c 69 6e 65 20 28 |g, seria|l line (|
|000008b0| 53 4c 49 50 29 2c 20 61 | 6e 64 20 38 30 32 2e 32 |SLIP), a|nd 802.2|
|000008c0| 20 45 74 68 65 72 6e 65 | 74 2e 0d 54 68 65 20 4c | Etherne|t..The L|
|000008d0| 41 50 20 6d 6f 64 75 6c | 65 73 20 61 72 65 20 77 |AP modul|es are w|
|000008e0| 72 69 74 74 65 6e 2c 20 | 63 6f 6d 70 69 6c 65 64 |ritten, |compiled|
|000008f0| 2c 20 6c 69 6e 6b 65 64 | 2c 20 61 6e 64 20 6c 6f |, linked|, and lo|
|00000900| 61 64 65 64 20 69 6e 64 | 65 70 65 6e 64 65 6e 74 |aded ind|ependent|
|00000910| 6c 79 20 66 72 6f 6d 20 | 74 68 65 20 62 61 73 69 |ly from |the basi|
|00000920| 63 20 64 72 69 76 65 72 | 2e 20 20 49 50 20 61 6e |c driver|. IP an|
|00000930| 64 20 4c 41 50 73 20 63 | 6f 6d 6d 75 6e 69 63 61 |d LAPs c|ommunica|
|00000940| 74 65 20 74 68 72 6f 75 | 67 68 20 61 20 70 72 65 |te throu|gh a pre|
|00000950| 2d 64 65 66 69 6e 65 64 | 20 69 6e 74 65 72 66 61 |-defined| interfa|
|00000960| 63 65 20 74 68 61 74 20 | 69 6e 63 6c 75 64 65 73 |ce that |includes|
|00000970| 20 61 20 64 69 73 70 61 | 74 63 68 20 74 61 62 6c | a dispa|tch tabl|
|00000980| 65 20 61 6e 64 20 73 68 | 61 72 65 64 20 64 61 74 |e and sh|ared dat|
|00000990| 61 20 73 74 72 75 63 74 | 75 72 65 73 2e 20 20 4c |a struct|ures. L|
|000009a0| 41 50 20 70 72 6f 63 65 | 64 75 72 65 73 20 61 72 |AP proce|dures ar|
|000009b0| 65 20 63 61 6c 6c 65 64 | 20 75 73 69 6e 67 20 4d |e called| using M|
|000009c0| 50 57 20 43 20 63 61 6c | 6c 69 6e 67 20 63 6f 6e |PW C cal|ling con|
|000009d0| 76 65 6e 74 69 6f 6e 73 | 20 61 6e 64 20 6d 75 73 |ventions| and mus|
|000009e0| 74 20 61 63 63 65 73 73 | 20 61 72 67 75 6d 65 6e |t access| argumen|
|000009f0| 74 73 20 61 6e 64 20 70 | 72 65 73 65 72 76 65 20 |ts and p|reserve |
|00000a00| 72 65 67 69 73 74 65 72 | 73 20 61 70 70 72 6f 70 |register|s approp|
|00000a10| 72 69 61 74 65 6c 79 2e | 0d 41 6c 74 65 72 6e 61 |riately.|.Alterna|
|00000a20| 74 65 20 4c 41 50 20 46 | 69 6c 65 73 0d 4d 61 63 |te LAP F|iles.Mac|
|00000a30| 54 43 50 20 73 75 70 70 | 6f 72 74 73 20 61 6c 74 |TCP supp|orts alt|
|00000a40| 65 72 6e 61 74 65 20 4c | 41 50 73 20 62 79 20 69 |ernate L|APs by i|
|00000a50| 6e 74 65 72 70 72 65 74 | 69 6e 67 20 72 65 73 6f |nterpret|ing reso|
|00000a60| 75 72 63 65 73 20 73 74 | 6f 72 65 64 20 69 6e 20 |urces st|ored in |
|00000a70| 4d 61 63 54 43 50 20 4c | 41 50 20 66 69 6c 65 73 |MacTCP L|AP files|
|00000a80| 20 69 6e 20 74 68 65 20 | 53 79 73 74 65 6d 20 46 | in the |System F|
|00000a90| 6f 6c 64 65 72 2e 20 54 | 68 65 73 65 20 66 69 6c |older. T|hese fil|
|00000aa0| 65 73 20 6d 75 73 74 20 | 62 65 20 6f 66 20 66 69 |es must |be of fi|
|00000ab0| 6c 65 20 74 79 70 65 20 | d4 6d 64 65 76 d5 2e 20 |le type |.mdev.. |
|00000ac0| 20 54 68 65 20 64 65 76 | 65 6c 6f 70 65 72 20 63 | The dev|eloper c|
|00000ad0| 61 6e 20 73 70 65 63 69 | 66 79 20 61 6e 79 20 63 |an speci|fy any c|
|00000ae0| 72 65 61 74 6f 72 20 73 | 69 67 6e 61 74 75 72 65 |reator s|ignature|
|00000af0| 2e 20 20 54 68 65 73 65 | 20 d4 6d 64 65 76 d5 20 |. These| .mdev. |
|00000b00| 66 69 6c 65 73 20 61 72 | 65 20 73 69 6d 69 6c 61 |files ar|e simila|
|00000b10| 72 20 69 6e 20 66 75 6e | 63 74 69 6f 6e 61 6c 69 |r in fun|ctionali|
|00000b20| 74 79 20 74 6f 20 74 68 | 65 20 d4 61 64 65 76 d5 |ty to th|e .adev.|
|00000b30| 20 66 69 6c 65 20 75 73 | 65 64 20 62 79 20 41 70 | file us|ed by Ap|
|00000b40| 70 6c 65 54 61 6c 6b 2e | 20 20 54 68 65 20 d4 6d |pleTalk.| The .m|
|00000b50| 64 65 76 d5 20 66 69 6c | 65 20 68 61 73 20 74 68 |dev. fil|e has th|
|00000b60| 65 20 61 62 69 6c 69 74 | 79 20 74 6f 20 61 64 64 |e abilit|y to add|
|00000b70| 20 6c 69 6e 6b 20 6c 61 | 79 65 72 20 70 72 6f 74 | link la|yer prot|
|00000b80| 6f 63 6f 6c 20 73 75 70 | 70 6f 72 74 20 74 6f 20 |ocol sup|port to |
|00000b90| 4d 61 63 54 43 50 2e 20 | 54 68 69 73 20 73 75 70 |MacTCP. |This sup|
|00000ba0| 70 6f 72 74 20 69 6e 63 | 6c 75 64 65 73 20 73 65 |port inc|ludes se|
|00000bb0| 6c 65 63 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 4c |lection |of the L|
|00000bc0| 41 50 20 75 73 65 64 20 | 62 79 20 4d 61 63 54 43 |AP used |by MacTC|
|00000bd0| 50 20 66 72 6f 6d 20 74 | 68 65 20 4d 61 63 54 43 |P from t|he MacTC|
|00000be0| 50 20 43 6f 6e 74 72 6f | 6c 20 50 61 6e 65 6c 20 |P Contro|l Panel |
|00000bf0| 69 6e 74 65 72 66 61 63 | 65 2e 20 54 68 65 20 6d |interfac|e. The m|
|00000c00| 69 6e 69 6d 75 6d 20 72 | 65 73 6f 75 72 63 65 73 |inimum r|esources|
|00000c10| 20 74 68 65 20 d4 6d 64 | 65 76 d5 20 4c 41 50 20 | the .md|ev. LAP |
|00000c20| 66 69 6c 65 20 6d 75 73 | 74 20 63 6f 6e 74 61 69 |file mus|t contai|
|00000c30| 6e 20 61 72 65 20 64 65 | 73 63 72 69 62 65 64 20 |n are de|scribed |
|00000c40| 69 6e 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |in the f|ollowing|
|00000c50| 20 74 61 62 6c 65 3a 0d | 09 0d 52 65 73 6f 75 72 | table:.|..Resour|
|00000c60| 63 65 20 74 79 70 65 09 | 52 65 73 6f 75 72 63 65 |ce type.|Resource|
|00000c70| 20 49 44 09 44 65 73 63 | 72 69 70 74 69 6f 6e 0d | ID.Desc|ription.|
|00000c80| 09 0d 6d 64 65 76 09 2d | 34 30 33 32 09 52 65 74 |..mdev.-|4032.Ret|
|00000c90| 75 72 6e 73 20 43 6f 6e | 74 72 6f 6c 20 50 61 6e |urns Con|trol Pan|
|00000ca0| 65 6c 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 0d 49 |el infor|mation.I|
|00000cb0| 43 4e 23 09 2d 34 30 33 | 32 09 43 6f 6e 74 61 69 |CN#.-403|2.Contai|
|00000cc0| 6e 73 20 4c 41 50 20 69 | 63 6f 6e 0d 69 70 6c 70 |ns LAP i|con.iplp|
|00000cd0| 09 2d 34 30 33 32 09 43 | 6f 6e 74 61 69 6e 73 20 |.-4032.C|ontains |
|00000ce0| 4c 41 50 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 |LAP code| resourc|
|00000cf0| 65 0d 42 4e 44 4c 09 31 | 32 38 09 46 69 6e 64 65 |e.BNDL.1|28.Finde|
|00000d00| 72 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 0d 46 52 |r inform|ation.FR|
|00000d10| 45 46 09 31 32 38 09 46 | 69 6e 64 65 72 20 69 6e |EF.128.F|inder in|
|00000d20| 66 6f 72 6d 61 74 69 6f | 6e 0d 6f 77 6e 65 72 20 |formatio|n.owner |
|00000d30| 72 65 73 6f 75 72 63 65 | 09 09 46 69 6e 64 65 72 |resource|..Finder|
|00000d40| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 0d 09 0d 54 | informa|tion...T|
|00000d50| 68 65 20 49 43 4e 23 20 | 61 6e 64 20 53 54 52 20 |he ICN# |and STR |
|00000d60| 72 65 73 6f 75 72 63 65 | 73 20 61 72 65 20 74 68 |resource|s are th|
|00000d70| 65 20 69 63 6f 6e 20 61 | 6e 64 20 74 68 65 20 73 |e icon a|nd the s|
|00000d80| 74 72 69 6e 67 20 74 68 | 61 74 20 74 68 65 20 4d |tring th|at the M|
|00000d90| 61 63 54 43 50 20 d4 63 | 64 65 76 d5 20 64 69 73 |acTCP .c|dev. dis|
|00000da0| 70 6c 61 79 73 20 69 6e | 20 74 68 65 20 4c 41 50 |plays in| the LAP|
|00000db0| 20 73 65 63 74 69 6f 6e | 20 6f 66 20 74 68 65 20 | section| of the |
|00000dc0| 43 6f 6e 74 72 6f 6c 20 | 50 61 6e 65 6c 20 77 69 |Control |Panel wi|
|00000dd0| 6e 64 6f 77 2e 20 20 49 | 6e 20 61 64 64 69 74 69 |ndow. I|n additi|
|00000de0| 6f 6e 2c 20 69 66 20 74 | 68 65 20 d4 6d 64 65 76 |on, if t|he .mdev|
|00000df0| d5 20 66 69 6c 65 20 63 | 6f 6e 74 61 69 6e 73 20 |. file c|ontains |
|00000e00| 74 68 65 20 42 4e 44 4c | 2c 20 46 52 45 46 2c 20 |the BNDL|, FREF, |
|00000e10| 61 6e 64 20 61 6e 20 6f | 77 6e 65 72 20 72 65 73 |and an o|wner res|
|00000e20| 6f 75 72 63 65 2c 20 61 | 6e 64 20 69 66 20 74 68 |ource, a|nd if th|
|00000e30| 65 20 d4 6d 64 65 76 d5 | 20 66 69 6c 65 20 68 61 |e .mdev.| file ha|
|00000e40| 73 20 69 74 73 20 62 75 | 6e 64 6c 65 2d 62 69 74 |s its bu|ndle-bit|
|00000e50| 20 73 65 74 2c 20 74 68 | 65 20 49 43 4e 23 20 77 | set, th|e ICN# w|
|00000e60| 69 6c 6c 20 61 70 70 65 | 61 72 20 69 6e 20 74 68 |ill appe|ar in th|
|00000e70| 65 20 46 69 6e 64 65 72 | 2e 20 28 52 65 66 65 72 |e Finder|. (Refer|
|00000e80| 20 74 6f 20 49 6e 73 69 | 64 65 20 4d 61 63 69 6e | to Insi|de Macin|
|00000e90| 74 6f 73 68 2c 20 56 6f | 6c 75 6d 65 20 31 2c 20 |tosh, Vo|lume 1, |
|00000ea0| 66 6f 72 20 6d 6f 72 65 | 20 69 6e 66 6f 72 6d 61 |for more| informa|
|00000eb0| 74 69 6f 6e 20 61 62 6f | 75 74 20 74 68 65 20 49 |tion abo|ut the I|
|00000ec0| 43 4e 23 2c 20 42 4e 44 | 4c 2c 20 46 52 45 46 2c |CN#, BND|L, FREF,|
|00000ed0| 20 61 6e 64 20 6f 77 6e | 65 72 20 72 65 73 6f 75 | and own|er resou|
|00000ee0| 72 63 65 73 2e 29 0d 54 | 68 65 20 66 6f 6c 6c 6f |rces.).T|he follo|
|00000ef0| 77 69 6e 67 20 73 65 63 | 74 69 6f 6e 73 20 64 65 |wing sec|tions de|
|00000f00| 73 63 72 69 62 65 20 68 | 6f 77 20 4d 61 63 54 43 |scribe h|ow MacTC|
|00000f10| 50 20 75 73 65 73 20 74 | 68 65 73 65 20 72 65 73 |P uses t|hese res|
|00000f20| 6f 75 72 63 65 73 20 20 | 54 68 65 72 65 20 61 72 |ources |There ar|
|00000f30| 65 20 74 68 72 65 65 20 | 64 69 66 66 65 72 65 6e |e three |differen|
|00000f40| 74 20 73 74 61 67 65 73 | 20 6f 66 20 69 6e 74 65 |t stages| of inte|
|00000f50| 72 61 63 74 69 6f 6e 20 | 62 65 74 77 65 65 6e 20 |raction |between |
|00000f60| 4d 61 63 54 43 50 20 61 | 6e 64 20 61 20 4c 41 50 |MacTCP a|nd a LAP|
|00000f70| 3a 20 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |: confi|guration|
|00000f80| 2c 20 73 79 73 74 65 6d | 20 73 74 61 72 74 75 70 |, system| startup|
|00000f90| 2c 20 61 6e 64 20 6f 70 | 65 72 61 74 69 6f 6e 2e |, and op|eration.|
|00000fa0| 0d 43 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 0d 57 |.Configu|ration.W|
|00000fb0| 68 65 6e 20 74 68 65 20 | 4d 61 63 54 43 50 20 43 |hen the |MacTCP C|
|00000fc0| 6f 6e 74 72 6f 6c 20 50 | 61 6e 65 6c 20 69 73 20 |ontrol P|anel is |
|00000fd0| 6f 70 65 6e 65 64 2c 20 | 74 68 65 20 d4 63 64 65 |opened, |the .cde|
|00000fe0| 76 d5 20 64 69 73 70 6c | 61 79 73 20 74 68 65 20 |v. displ|ays the |
|00000ff0| 4c 41 50 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |LAP info|rmation |
|00001000| 66 6f 72 20 74 68 65 20 | 41 70 70 6c 65 54 61 6c |for the |AppleTal|
|00001010| 6b d1 61 6e 64 2c 20 69 | 66 20 61 76 61 69 6c 61 |k.and, i|f availa|
|00001020| 62 6c 65 d1 45 74 68 65 | 72 6e 65 74 2d 74 79 70 |ble.Ethe|rnet-typ|
|00001030| 65 20 4c 41 50 73 20 74 | 68 61 74 20 61 72 65 20 |e LAPs t|hat are |
|00001040| 62 75 69 6c 74 20 69 6e | 74 6f 20 76 65 72 73 69 |built in|to versi|
|00001050| 6f 6e 20 31 2e 31 2e 20 | 54 68 65 6e 20 69 74 20 |on 1.1. |Then it |
|00001060| 73 65 61 72 63 68 65 73 | 20 74 68 65 20 53 79 73 |searches| the Sys|
|00001070| 74 65 6d 20 46 6f 6c 64 | 65 72 20 66 6f 72 20 66 |tem Fold|er for f|
|00001080| 69 6c 65 73 20 6f 66 20 | 74 79 70 65 20 d4 6d 64 |iles of |type .md|
|00001090| 65 76 d5 20 77 68 69 63 | 68 20 63 6f 6e 74 61 69 |ev. whic|h contai|
|000010a0| 6e 20 74 68 65 20 61 6c | 74 65 72 6e 61 74 65 20 |n the al|ternate |
|000010b0| 4c 41 50 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |LAP info|rmation |
|000010c0| 61 6e 64 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 |and code| resourc|
|000010d0| 65 73 20 66 6f 72 20 4d | 61 63 54 43 50 2e 20 20 |es for M|acTCP. |
|000010e0| 46 6f 72 20 65 61 63 68 | 20 d4 6d 64 65 76 d5 20 |For each| .mdev. |
|000010f0| 66 69 6c 65 20 66 6f 75 | 6e 64 2c 20 74 68 65 20 |file fou|nd, the |
|00001100| 43 6f 6e 74 72 6f 6c 20 | 50 61 6e 65 6c 20 61 74 |Control |Panel at|
|00001110| 74 65 6d 70 74 73 20 74 | 6f 20 6c 6f 61 64 20 61 |tempts t|o load a|
|00001120| 6e 20 d4 6d 64 65 76 d5 | 20 72 65 73 6f 75 72 63 |n .mdev.| resourc|
|00001130| 65 20 77 69 74 68 20 61 | 6e 20 49 44 20 6f 66 20 |e with a|n ID of |
|00001140| 2d 34 30 33 32 2e 20 20 | 49 66 20 74 68 65 20 72 |-4032. |If the r|
|00001150| 65 73 6f 75 72 63 65 20 | 69 73 20 6e 6f 74 20 66 |esource |is not f|
|00001160| 6f 75 6e 64 2c 20 74 68 | 65 20 43 6f 6e 74 72 6f |ound, th|e Contro|
|00001170| 6c 20 50 61 6e 65 6c 20 | 63 6f 6e 74 69 6e 75 65 |l Panel |continue|
|00001180| 73 20 73 63 61 6e 6e 69 | 6e 67 20 74 68 65 20 53 |s scanni|ng the S|
|00001190| 79 73 74 65 6d 20 46 6f | 6c 64 65 72 2e 0d 41 73 |ystem Fo|lder..As|
|000011a0| 20 74 68 65 20 d4 63 64 | 65 76 d5 20 61 63 63 65 | the .cd|ev. acce|
|000011b0| 73 73 65 73 20 65 61 63 | 68 20 d4 6d 64 65 76 d5 |sses eac|h .mdev.|
|000011c0| 20 66 69 6c 65 2c 20 65 | 61 63 68 20 d4 6d 64 65 | file, e|ach .mde|
|000011d0| 76 d5 20 72 65 73 70 6f | 6e 64 73 20 62 79 20 70 |v. respo|nds by p|
|000011e0| 61 73 73 69 6e 67 20 76 | 61 72 69 6f 75 73 20 69 |assing v|arious i|
|000011f0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 62 61 63 6b 20 |nformati|on back |
|00001200| 74 6f 20 74 68 65 20 4d | 61 63 54 43 50 20 d4 63 |to the M|acTCP .c|
|00001210| 64 65 76 d5 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |dev., in|cluding |
|00001220| 74 68 65 20 69 63 6f 6e | 20 61 6e 64 20 69 63 6f |the icon| and ico|
|00001230| 6e 20 73 74 72 69 6e 67 | 20 74 6f 20 62 65 20 64 |n string| to be d|
|00001240| 69 73 70 6c 61 79 65 64 | 2e 20 20 45 61 63 68 20 |isplayed|. Each |
|00001250| d4 6d 64 65 76 d5 20 66 | 69 6c 65 20 6d 61 79 20 |.mdev. f|ile may |
|00001260| 73 75 70 70 6f 72 74 20 | 6d 6f 72 65 20 74 68 61 |support |more tha|
|00001270| 6e 20 6f 6e 65 20 6c 69 | 6e 6b 20 6f 66 20 74 68 |n one li|nk of th|
|00001280| 65 20 73 61 6d 65 20 4c | 41 50 20 74 79 70 65 20 |e same L|AP type |
|00001290| 61 6e 64 2c 20 69 66 20 | 73 6f 2c 20 6d 75 73 74 |and, if |so, must|
|000012a0| 20 61 6c 73 6f 20 72 65 | 74 75 72 6e 20 69 6e 66 | also re|turn inf|
|000012b0| 6f 72 6d 61 74 69 6f 6e | 20 61 62 6f 75 74 20 74 |ormation| about t|
|000012c0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 69 64 65 |he numbe|r of ide|
|000012d0| 6e 74 69 63 61 6c 20 69 | 63 6f 6e 73 20 74 6f 20 |ntical i|cons to |
|000012e0| 64 69 73 70 6c 61 79 20 | 61 6e 64 20 74 68 65 20 |display |and the |
|000012f0| 73 74 72 69 6e 67 73 20 | 66 6f 72 20 65 61 63 68 |strings |for each|
|00001300| 2e 20 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |. For e|xample, |
|00001310| 69 6e 20 45 74 68 65 72 | 6e 65 74 20 74 68 65 20 |in Ether|net the |
|00001320| 4d 61 63 54 43 50 20 d4 | 63 64 65 76 d5 20 70 6c |MacTCP .|cdev. pl|
|00001330| 61 63 65 73 20 74 68 65 | 20 73 74 72 69 6e 67 20 |aces the| string |
|00001340| d2 45 74 68 65 72 6e 65 | 74 28 6e 29 d3 20 75 6e |.Etherne|t(n). un|
|00001350| 64 65 72 20 65 61 63 68 | 20 69 63 6f 6e 2c 20 77 |der each| icon, w|
|00001360| 68 65 72 65 20 6e 20 65 | 71 75 61 6c 73 20 65 61 |here n e|quals ea|
|00001370| 63 68 20 63 61 72 64 d5 | 73 20 73 6c 6f 74 20 6e |ch card.|s slot n|
|00001380| 75 6d 62 65 72 2e 0d 49 | 66 20 6c 6f 61 64 69 6e |umber..I|f loadin|
|00001390| 67 20 77 61 73 20 73 75 | 63 63 65 73 73 66 75 6c |g was su|ccessful|
|000013a0| 2c 20 74 68 65 20 43 6f | 6e 74 72 6f 6c 20 50 61 |, the Co|ntrol Pa|
|000013b0| 6e 65 6c 20 63 61 6c 6c | 73 20 74 68 65 20 d4 6d |nel call|s the .m|
|000013c0| 64 65 76 d5 20 72 65 73 | 6f 75 72 63 65 20 61 74 |dev. res|ource at|
|000013d0| 20 6f 66 66 73 65 74 20 | 30 20 75 73 69 6e 67 20 | offset |0 using |
|000013e0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 61 |the foll|owing ca|
|000013f0| 6c 6c 69 6e 67 20 63 6f | 6e 76 65 6e 74 69 6f 6e |lling co|nvention|
|00001400| 73 3a 0d 43 61 6c 6c 3a | 09 41 30 20 28 6c 6f 6e |s:.Call:|.A0 (lon|
|00001410| 67 29 09 41 64 64 72 65 | 73 73 20 6f 66 20 74 68 |g).Addre|ss of th|
|00001420| 65 20 47 65 74 4d 44 45 | 56 20 72 6f 75 74 69 6e |e GetMDE|V routin|
|00001430| 65 20 62 65 69 6e 67 20 | 63 61 6c 6c 65 64 0d 09 |e being |called..|
|00001440| 44 30 20 28 6c 6f 6e 67 | 29 09 31 30 31 20 3d 3d |D0 (long|).101 ==|
|00001450| 20 d4 47 65 74 20 4d 44 | 45 56 20 69 6e 66 6f 72 | .Get MD|EV infor|
|00001460| 6d 61 74 69 6f 6e d5 0d | 09 44 32 20 28 6c 6f 6e |mation..|.D2 (lon|
|00001470| 67 29 09 56 61 6c 75 65 | 20 72 65 74 75 72 6e 65 |g).Value| returne|
|00001480| 64 20 66 72 6f 6d 20 70 | 72 65 76 69 6f 75 73 20 |d from p|revious |
|00001490| 47 65 74 4d 44 45 56 20 | 63 61 6c 6c 2c 20 6f 72 |GetMDEV |call, or|
|000014a0| 20 30 20 69 66 20 66 69 | 72 73 74 20 63 61 6c 6c | 0 if fi|rst call|
|000014b0| 0d 52 65 74 75 72 6e 3a | 09 41 30 20 28 6c 6f 6e |.Return:|.A0 (lon|
|000014c0| 67 29 09 50 6f 69 6e 74 | 65 72 20 74 6f 20 50 61 |g).Point|er to Pa|
|000014d0| 73 63 61 6c 2d 66 6f 72 | 6d 61 74 20 73 74 72 69 |scal-for|mat stri|
|000014e0| 6e 67 20 74 6f 20 70 6c | 61 63 65 20 75 6e 64 65 |ng to pl|ace unde|
|000014f0| 72 20 69 63 6f 6e 0d 09 | 44 30 20 28 62 79 74 65 |r icon..|D0 (byte|
|00001500| 29 09 53 74 61 74 75 73 | 20 66 6c 61 67 0d 09 44 |).Status| flag..D|
|00001510| 31 20 28 77 6f 72 64 29 | 09 4e 75 42 75 73 20 73 |1 (word)|.NuBus s|
|00001520| 6c 6f 74 20 6e 75 6d 62 | 65 72 0d 09 44 32 20 28 |lot numb|er..D2 (|
|00001530| 6c 6f 6e 67 29 09 56 61 | 6c 75 65 20 74 6f 20 67 |long).Va|lue to g|
|00001540| 69 76 65 20 6e 65 78 74 | 20 47 65 74 4d 44 45 56 |ive next| GetMDEV|
|00001550| 20 63 61 6c 6c 20 69 6e | 20 44 32 0d 4f 6e 20 72 | call in| D2.On r|
|00001560| 65 74 75 72 6e 2c 20 74 | 68 65 20 d4 6d 64 65 76 |eturn, t|he .mdev|
|00001570| d5 20 72 6f 75 74 69 6e | 65 20 73 68 6f 75 6c 64 |. routin|e should|
|00001580| 20 72 65 74 75 72 6e 20 | 61 20 73 74 61 74 75 73 | return |a status|
|00001590| 20 76 61 6c 75 65 20 6f | 66 20 2d 31 20 6f 72 20 | value o|f -1 or |
|000015a0| 30 20 69 6e 20 44 30 20 | 74 6f 20 69 6e 64 69 63 |0 in D0 |to indic|
|000015b0| 61 74 65 20 61 20 76 61 | 6c 69 64 20 72 65 74 75 |ate a va|lid retu|
|000015c0| 72 6e 2e 20 20 49 6e 20 | 74 68 69 73 20 63 61 73 |rn. In |this cas|
|000015d0| 65 2c 20 41 30 20 70 6f | 69 6e 74 73 20 74 6f 20 |e, A0 po|ints to |
|000015e0| 61 20 50 61 73 63 61 6c | 2d 66 6f 72 6d 61 74 20 |a Pascal|-format |
|000015f0| 73 74 72 69 6e 67 20 74 | 6f 20 62 65 20 64 69 73 |string t|o be dis|
|00001600| 70 6c 61 79 65 64 20 75 | 6e 64 65 72 20 74 68 65 |played u|nder the|
|00001610| 20 69 63 6f 6e 2c 20 44 | 31 20 63 6f 6e 74 61 69 | icon, D|1 contai|
|00001620| 6e 73 20 74 68 65 20 4e | 75 42 75 73 20 73 6c 6f |ns the N|uBus slo|
|00001630| 74 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 68 65 20 |t number| of the |
|00001640| 62 6f 61 72 64 2c 20 61 | 6e 64 20 44 32 20 63 61 |board, a|nd D2 ca|
|00001650| 6e 20 62 65 20 75 73 65 | 64 20 66 6f 72 20 63 6f |n be use|d for co|
|00001660| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 20 77 69 74 68 |mmunicat|ion with|
|00001670| 20 74 68 65 20 6e 65 78 | 74 20 63 61 6c 6c 20 74 | the nex|t call t|
|00001680| 6f 20 74 68 65 20 d4 6d | 64 65 76 d5 20 72 6f 75 |o the .m|dev. rou|
|00001690| 74 69 6e 65 2e 20 20 54 | 68 65 20 4e 75 42 75 73 |tine. T|he NuBus|
|000016a0| 20 73 6c 6f 74 20 6e 75 | 6d 62 65 72 20 69 73 20 | slot nu|mber is |
|000016b0| 70 61 73 73 65 64 20 75 | 6e 69 6e 74 65 72 70 72 |passed u|ninterpr|
|000016c0| 65 74 65 64 20 74 6f 20 | 74 68 65 20 4c 41 50 d5 |eted to |the LAP.|
|000016d0| 73 20 69 6e 69 74 69 61 | 6c 69 7a 61 74 69 6f 6e |s initia|lization|
|000016e0| 20 72 6f 75 74 69 6e 65 | 20 61 6e 64 20 63 61 6e | routine| and can|
|000016f0| 20 74 68 65 6e 20 62 65 | 20 75 73 65 64 20 66 6f | then be| used fo|
|00001700| 72 20 70 72 69 76 61 74 | 65 20 63 6f 6d 6d 75 6e |r privat|e commun|
|00001710| 69 63 61 74 69 6f 6e 2e | 20 20 49 74 20 69 73 20 |ication.| It is |
|00001720| 72 65 63 6f 6d 6d 65 6e | 64 65 64 20 74 68 61 74 |recommen|ded that|
|00001730| 20 74 68 65 20 4c 41 50 | 20 75 73 65 20 30 20 66 | the LAP| use 0 f|
|00001740| 6f 72 20 6d 61 63 68 69 | 6e 65 73 20 77 69 74 68 |or machi|nes with|
|00001750| 6f 75 74 20 4e 75 42 75 | 73 20 73 6c 6f 74 73 20 |out NuBu|s slots |
|00001760| 61 6e 64 20 4e 75 42 75 | 73 20 6d 61 63 68 69 6e |and NuBu|s machin|
|00001770| 65 73 20 77 69 74 68 20 | 61 20 73 69 6e 67 6c 65 |es with |a single|
|00001780| 20 6c 69 6e 6b 20 63 61 | 72 64 20 73 6f 20 74 68 | link ca|rd so th|
|00001790| 61 74 20 75 73 65 72 73 | 20 63 61 6e 20 72 65 63 |at users| can rec|
|000017a0| 6f 6e 66 69 67 75 72 65 | 20 74 68 65 69 72 20 68 |onfigure| their h|
|000017b0| 61 72 64 77 61 72 65 20 | 77 69 74 68 6f 75 74 20 |ardware |without |
|000017c0| 72 65 63 6f 6e 66 69 67 | 75 72 69 6e 67 20 4d 61 |reconfig|uring Ma|
|000017d0| 63 54 43 50 2e 0d 53 74 | 61 72 74 75 70 0d 41 74 |cTCP..St|artup.At|
|000017e0| 20 73 79 73 74 65 6d 20 | 73 74 61 72 74 75 70 20 | system |startup |
|000017f0| 74 69 6d 65 2c 20 74 68 | 65 20 4d 61 63 54 43 50 |time, th|e MacTCP|
|00001800| 20 49 4e 49 54 2d 33 31 | 20 63 6f 64 65 20 6c 6f | INIT-31| code lo|
|00001810| 61 64 73 20 74 68 65 20 | 6d 61 69 6e 20 64 72 69 |ads the |main dri|
|00001820| 76 65 72 20 63 6f 64 65 | 20 69 6e 74 6f 20 74 68 |ver code| into th|
|00001830| 65 20 73 79 73 74 65 6d | 20 68 65 61 70 20 61 6e |e system| heap an|
|00001840| 64 20 72 65 61 64 73 20 | 74 68 65 20 49 50 20 63 |d reads |the IP c|
|00001850| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 69 6e 66 |onfigura|tion inf|
|00001860| 6f 72 6d 61 74 69 6f 6e | 20 66 72 6f 6d 20 74 68 |ormation| from th|
|00001870| 65 20 d4 69 70 6c 6e d5 | 20 72 65 73 6f 75 72 63 |e .ipln.| resourc|
|00001880| 65 20 63 6f 6e 74 61 69 | 6e 65 64 20 69 6e 20 65 |e contai|ned in e|
|00001890| 69 74 68 65 72 20 74 68 | 65 20 4d 61 63 54 43 50 |ither th|e MacTCP|
|000018a0| 20 70 72 65 70 20 66 69 | 6c 65 20 6f 72 20 74 68 | prep fi|le or th|
|000018b0| 65 20 4d 61 63 54 43 50 | 20 64 72 69 76 65 72 20 |e MacTCP| driver |
|000018c0| 66 69 6c 65 2e 20 20 54 | 68 65 20 63 6f 6e 66 69 |file. T|he confi|
|000018d0| 67 75 72 61 74 69 6f 6e | 20 69 6e 66 6f 72 6d 61 |guration| informa|
|000018e0| 74 69 6f 6e 20 69 6e 63 | 6c 75 64 65 73 20 74 68 |tion inc|ludes th|
|000018f0| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 66 69 |e name o|f the fi|
|00001900| 6c 65 20 74 68 61 74 20 | 63 6f 6e 74 61 69 6e 73 |le that |contains|
|00001910| 20 74 68 65 20 4c 41 50 | 20 63 6f 64 65 2e 20 20 | the LAP| code. |
|00001920| 49 66 20 74 68 65 20 6e | 61 6d 65 20 69 73 20 4e |If the n|ame is N|
|00001930| 49 4c 2c 20 74 68 65 20 | 4c 41 50 20 63 6f 64 65 |IL, the |LAP code|
|00001940| 20 72 65 73 69 64 65 73 | 20 69 6e 20 74 68 65 20 | resides| in the |
|00001950| 4d 61 63 54 43 50 20 64 | 72 69 76 65 72 20 66 69 |MacTCP d|river fi|
|00001960| 6c 65 2e 20 20 54 68 65 | 20 61 63 74 69 76 65 4c |le. The| activeL|
|00001970| 61 70 20 66 69 65 6c 64 | 20 63 6f 6e 74 61 69 6e |ap field| contain|
|00001980| 73 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 20 49 |s the re|source I|
|00001990| 44 20 6f 66 20 74 68 65 | 20 4c 41 50 20 63 6f 64 |D of the| LAP cod|
|000019a0| 65 20 72 65 73 6f 75 72 | 63 65 2e 0d 54 68 65 20 |e resour|ce..The |
|000019b0| 49 4e 49 54 2d 33 31 20 | 63 6f 64 65 20 74 68 65 |INIT-31 |code the|
|000019c0| 6e 20 6c 6f 61 64 73 20 | 74 68 65 20 69 6e 64 69 |n loads |the indi|
|000019d0| 63 61 74 65 64 20 4c 41 | 50 20 63 6f 64 65 20 72 |cated LA|P code r|
|000019e0| 65 73 6f 75 72 63 65 20 | 28 6f 66 20 74 79 70 65 |esource |(of type|
|000019f0| 20 d4 69 70 6c 70 d5 29 | 20 69 6e 74 6f 20 6d 65 | .iplp.)| into me|
|00001a00| 6d 6f 72 79 20 77 69 74 | 68 20 74 68 65 20 64 72 |mory wit|h the dr|
|00001a10| 69 76 65 72 20 28 75 73 | 75 61 6c 6c 79 20 74 68 |iver (us|ually th|
|00001a20| 65 20 73 79 73 74 65 6d | 20 68 65 61 70 29 20 61 |e system| heap) a|
|00001a30| 6e 64 20 6c 6f 63 6b 73 | 20 69 74 20 64 6f 77 6e |nd locks| it down|
|00001a40| 2e 20 20 54 68 69 73 20 | 72 65 73 6f 75 72 63 65 |. This |resource|
|00001a50| 20 63 6f 6e 74 61 69 6e | 73 20 74 68 65 20 63 6f | contain|s the co|
|00001a60| 64 65 20 74 68 61 74 20 | 61 63 74 75 61 6c 6c 79 |de that |actually|
|00001a70| 20 65 6e 63 61 70 73 75 | 6c 61 74 65 73 20 61 6e | encapsu|lates an|
|00001a80| 64 20 74 72 61 6e 73 6d | 69 74 73 20 74 68 65 20 |d transm|its the |
|00001a90| 4c 41 50 2d 73 70 65 63 | 69 66 69 63 20 70 61 63 |LAP-spec|ific pac|
|00001aa0| 6b 65 74 73 2e 20 20 0d | 41 73 20 61 20 66 69 6e |kets. .|As a fin|
|00001ab0| 61 6c 20 73 74 61 72 74 | 2d 75 70 20 73 74 65 70 |al start|-up step|
|00001ac0| 2c 20 74 68 65 20 4c 41 | 50 20 69 73 20 63 61 6c |, the LA|P is cal|
|00001ad0| 6c 65 64 20 61 74 20 6f | 66 66 73 65 74 20 30 20 |led at o|ffset 0 |
|00001ae0| 75 73 69 6e 67 20 43 20 | 63 61 6c 6c 69 6e 67 20 |using C |calling |
|00001af0| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 20 74 6f 20 61 |conventi|ons to a|
|00001b00| 6c 6c 6f 63 61 74 65 20 | 61 20 4c 41 50 5f 49 6e |llocate |a LAP_In|
|00001b10| 66 6f 20 72 65 63 6f 72 | 64 2c 20 66 69 6c 6c 20 |fo recor|d, fill |
|00001b20| 69 6e 20 4c 41 50 20 70 | 61 72 61 6d 65 74 65 72 |in LAP p|arameter|
|00001b30| 73 2c 20 61 6e 64 20 72 | 65 74 75 72 6e 20 61 20 |s, and r|eturn a |
|00001b40| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 69 73 20 |pointer |to this |
|00001b50| 73 74 72 75 63 74 75 72 | 65 2e 20 20 20 41 6c 6c |structur|e. All|
|00001b60| 20 73 75 62 73 65 71 75 | 65 6e 74 20 63 61 6c 6c | subsequ|ent call|
|00001b70| 73 20 74 6f 20 74 68 65 | 20 4c 41 50 20 61 72 65 |s to the| LAP are|
|00001b80| 20 6d 61 64 65 20 74 68 | 72 6f 75 67 68 20 74 68 | made th|rough th|
|00001b90| 69 73 20 72 65 63 6f 72 | 64 20 74 6f 20 74 68 65 |is recor|d to the|
|00001ba0| 20 69 6e 64 69 76 69 64 | 75 61 6c 20 70 72 6f 63 | individ|ual proc|
|00001bb0| 65 64 75 72 65 73 2e 20 | 20 46 6f 72 20 61 20 43 |edures. | For a C|
|00001bc0| 20 6c 61 6e 67 75 61 67 | 65 20 64 65 73 63 72 69 | languag|e descri|
|00001bd0| 70 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 4c 41 50 |ption of| the LAP|
|00001be0| 49 6e 66 6f 20 72 65 63 | 6f 72 64 2c 20 72 65 66 |Info rec|ord, ref|
|00001bf0| 65 72 20 74 6f 20 74 68 | 65 20 73 65 63 74 69 6f |er to th|e sectio|
|00001c00| 6e 20 d2 73 74 72 75 63 | 74 20 4c 41 50 49 6e 66 |n .struc|t LAPInf|
|00001c10| 6f 20 7b 7d d3 20 69 6e | 20 74 68 65 20 61 70 70 |o {}. in| the app|
|00001c20| 65 6e 64 69 78 20 6f 66 | 20 74 68 69 73 20 64 6f |endix of| this do|
|00001c30| 63 75 6d 65 6e 74 2e 20 | 54 68 65 20 4c 41 50 20 |cument. |The LAP |
|00001c40| 73 68 6f 75 6c 64 20 61 | 6c 6c 6f 63 61 74 65 20 |should a|llocate |
|00001c50| 61 6e 79 20 6d 65 6d 6f | 72 79 20 69 74 20 6d 69 |any memo|ry it mi|
|00001c60| 67 68 74 20 6e 65 65 64 | 20 6c 61 74 65 72 20 61 |ght need| later a|
|00001c70| 74 20 74 68 69 73 20 74 | 69 6d 65 2c 20 72 61 74 |t this t|ime, rat|
|00001c80| 68 65 72 20 74 68 61 6e | 20 61 74 20 4c 41 50 5f |her than| at LAP_|
|00001c90| 69 6e 69 74 20 74 69 6d | 65 2c 20 73 69 6e 63 65 |init tim|e, since|
|00001ca0| 20 74 68 65 20 73 79 73 | 74 65 6d 20 68 65 61 70 | the sys|tem heap|
|00001cb0| 20 6d 61 79 20 62 65 20 | 72 65 73 69 7a 65 64 20 | may be |resized |
|00001cc0| 73 75 63 68 20 74 68 61 | 74 20 6d 65 6d 6f 72 79 |such tha|t memory|
|00001cd0| 20 61 6c 6c 6f 63 61 74 | 69 6f 6e 73 20 6d 61 79 | allocat|ions may|
|00001ce0| 20 66 61 69 6c 2e 0d 54 | 68 65 20 4c 41 50 49 6e | fail..T|he LAPIn|
|00001cf0| 66 6f 20 73 74 72 75 63 | 74 75 72 65 20 69 73 20 |fo struc|ture is |
|00001d00| 63 6f 6d 70 72 69 73 65 | 64 20 6f 66 20 61 20 66 |comprise|d of a f|
|00001d10| 69 78 65 64 20 70 61 72 | 74 20 74 68 61 74 20 69 |ixed par|t that i|
|00001d20| 73 20 74 68 65 20 73 61 | 6d 65 20 66 6f 72 20 61 |s the sa|me for a|
|00001d30| 6c 6c 20 4c 41 50 73 20 | 74 68 61 74 20 63 6f 6e |ll LAPs |that con|
|00001d40| 74 61 69 6e 20 61 20 64 | 69 73 70 61 74 63 68 20 |tain a d|ispatch |
|00001d50| 74 61 62 6c 65 20 61 6e | 64 20 4c 41 50 20 6f 70 |table an|d LAP op|
|00001d60| 65 72 61 74 69 6e 67 20 | 70 61 72 61 6d 65 74 65 |erating |paramete|
|00001d70| 72 73 2c 20 66 6f 6c 6c | 6f 77 65 64 20 62 79 20 |rs, foll|owed by |
|00001d80| 61 20 76 61 72 69 61 62 | 6c 65 20 6c 65 6e 67 74 |a variab|le lengt|
|00001d90| 68 20 70 61 72 74 20 77 | 68 6f 73 65 20 66 6f 72 |h part w|hose for|
|00001da0| 6d 61 74 20 69 73 20 64 | 65 66 69 6e 65 64 20 62 |mat is d|efined b|
|00001db0| 79 20 65 61 63 68 20 4c | 41 50 2e 20 20 54 68 69 |y each L|AP. Thi|
|00001dc0| 73 20 76 61 72 69 61 62 | 6c 65 20 70 61 72 74 20 |s variab|le part |
|00001dd0| 63 61 6e 20 69 6e 63 6c | 75 64 65 20 73 74 6f 72 |can incl|ude stor|
|00001de0| 61 67 65 20 66 6f 72 20 | 41 52 50 20 74 61 62 6c |age for |ARP tabl|
|00001df0| 65 73 2c 20 62 75 66 66 | 65 72 73 2c 20 63 6f 6e |es, buff|ers, con|
|00001e00| 74 72 6f 6c 20 62 6c 6f | 63 6b 73 2c 20 6f 72 20 |trol blo|cks, or |
|00001e10| 61 6e 79 20 6f 74 68 65 | 72 20 73 74 6f 72 61 67 |any othe|r storag|
|00001e20| 65 20 6e 65 65 64 65 64 | 20 62 79 20 74 68 65 20 |e needed| by the |
|00001e30| 4c 41 50 2e 20 54 68 65 | 20 6c 69 73 74 20 6f 66 |LAP. The| list of|
|00001e40| 20 4c 41 50 20 70 61 72 | 61 6d 65 74 65 72 73 20 | LAP par|ameters |
|00001e50| 74 68 61 74 20 6e 65 65 | 64 20 74 6f 20 62 65 20 |that nee|d to be |
|00001e60| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 61 72 65 20 |initiali|zed are |
|00001e70| 64 65 73 63 72 69 62 65 | 64 20 69 6e 20 74 68 65 |describe|d in the|
|00001e80| 20 73 65 63 74 69 6f 6e | 20 d2 73 74 72 75 63 74 | section| .struct|
|00001e90| 20 4c 41 50 49 6e 66 6f | 20 2a 4c 41 50 5f 6d 61 | LAPInfo| *LAP_ma|
|00001ea0| 69 6e 20 7b 7d d3 20 69 | 6e 20 74 68 65 20 61 70 |in {}. i|n the ap|
|00001eb0| 70 65 6e 64 69 78 20 6f | 66 20 74 68 69 73 20 64 |pendix o|f this d|
|00001ec0| 6f 63 75 6d 65 6e 74 2e | 0d 41 66 74 65 72 20 61 |ocument.|.After a|
|00001ed0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00001ee0| 4c 41 50 49 6e 66 6f 20 | 73 74 72 75 63 74 75 72 |LAPInfo |structur|
|00001ef0| 65 20 69 73 20 72 65 74 | 75 72 6e 65 64 20 74 6f |e is ret|urned to|
|00001f00| 20 74 68 65 20 64 72 69 | 76 65 72 2c 20 74 68 65 | the dri|ver, the|
|00001f10| 20 49 50 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f | IP conf|iguratio|
|00001f20| 6e 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 69 73 |n inform|ation is|
|00001f30| 20 63 6f 70 69 65 64 20 | 69 6e 74 6f 20 69 74 2e | copied |into it.|
|00001f40| 0d 4f 70 65 72 61 74 69 | 6f 6e 0d 57 68 65 6e 20 |.Operati|on.When |
|00001f50| 74 68 65 20 4d 61 63 54 | 43 50 20 64 72 69 76 65 |the MacT|CP drive|
|00001f60| 72 20 69 73 20 6f 70 65 | 6e 65 64 20 66 6f 72 20 |r is ope|ned for |
|00001f70| 74 68 65 20 66 69 72 73 | 74 20 74 69 6d 65 2c 20 |the firs|t time, |
|00001f80| 69 74 20 69 6e 69 74 69 | 61 6c 69 7a 65 73 20 61 |it initi|alizes a|
|00001f90| 6c 6c 20 6f 66 20 69 74 | 73 20 70 72 6f 74 6f 63 |ll of it|s protoc|
|00001fa0| 6f 6c 73 2c 20 73 74 61 | 72 74 69 6e 67 20 77 69 |ols, sta|rting wi|
|00001fb0| 74 68 20 74 68 65 20 4c | 41 50 20 61 6e 64 20 70 |th the L|AP and p|
|00001fc0| 72 6f 63 65 65 64 69 6e | 67 20 74 68 72 6f 75 67 |roceedin|g throug|
|00001fd0| 68 20 49 50 2c 20 49 43 | 4d 50 2c 20 54 43 50 20 |h IP, IC|MP, TCP |
|00001fe0| 61 6e 64 20 55 44 50 2e | 20 20 49 50 20 63 61 6c |and UDP.| IP cal|
|00001ff0| 6c 73 20 74 68 65 20 4c | 41 50 5f 69 6e 69 74 20 |ls the L|AP_init |
|00002000| 63 6f 64 65 20 62 79 20 | 63 61 6c 6c 69 6e 67 20 |code by |calling |
|00002010| 74 68 72 6f 75 67 68 20 | 74 68 65 20 64 69 73 70 |through |the disp|
|00002020| 61 74 63 68 20 74 61 62 | 6c 65 20 74 68 61 74 20 |atch tab|le that |
|00002030| 77 61 73 20 73 65 74 20 | 75 70 20 65 61 72 6c 69 |was set |up earli|
|00002040| 65 72 2e 20 20 54 68 65 | 20 4c 41 50 20 63 6f 64 |er. The| LAP cod|
|00002050| 65 20 63 61 6e 20 61 63 | 63 65 73 73 20 69 74 73 |e can ac|cess its|
|00002060| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 69 | configu|ration i|
|00002070| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 28 69 2e 65 2e |nformati|on (i.e.|
|00002080| 2c 20 74 68 65 20 73 6c | 6f 74 20 6e 75 6d 62 65 |, the sl|ot numbe|
|00002090| 72 29 20 73 74 6f 72 65 | 64 20 69 6e 20 74 68 65 |r) store|d in the|
|000020a0| 20 4c 41 50 49 6e 66 6f | 20 73 74 72 75 63 74 75 | LAPInfo| structu|
|000020b0| 72 65 2e 20 20 54 68 65 | 20 4c 41 50 20 63 6f 64 |re. The| LAP cod|
|000020c0| 65 20 73 68 6f 75 6c 64 | 6e d5 74 20 6d 6f 64 69 |e should|n.t modi|
|000020d0| 66 79 20 61 6e 79 20 6f | 66 20 74 68 65 20 66 69 |fy any o|f the fi|
|000020e0| 65 6c 64 73 20 69 6e 20 | 74 68 65 20 49 50 20 63 |elds in |the IP c|
|000020f0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 72 65 73 |onfigura|tion res|
|00002100| 6f 75 72 63 65 2e 20 0d | 4e 6f 74 65 3a 20 4d 61 |ource. .|Note: Ma|
|00002110| 63 54 43 50 20 31 2e 31 | 20 6c 69 6d 69 74 73 20 |cTCP 1.1| limits |
|00002120| 74 68 65 20 73 69 7a 65 | 20 6f 66 20 74 68 65 20 |the size| of the |
|00002130| 4c 41 50 20 68 65 61 64 | 65 72 20 74 68 61 74 20 |LAP head|er that |
|00002140| 69 73 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |is autom|atically|
|00002150| 20 61 6c 6c 6f 63 61 74 | 65 64 20 69 6e 20 74 68 | allocat|ed in th|
|00002160| 65 20 72 65 61 64 20 61 | 6e 64 20 77 72 69 74 65 |e read a|nd write|
|00002170| 20 62 75 66 66 65 72 73 | 20 74 6f 20 34 38 20 62 | buffers| to 48 b|
|00002180| 79 74 65 73 2e 0d 53 65 | 72 69 61 6c 20 4c 69 6e |ytes..Se|rial Lin|
|00002190| 65 20 43 6f 6e 6e 65 63 | 74 69 6f 6e 73 0d 53 65 |e Connec|tions.Se|
|000021a0| 72 69 61 6c 20 63 6f 6e | 6e 65 63 74 69 6f 6e 73 |rial con|nections|
|000021b0| 20 73 68 6f 75 6c 64 20 | 62 65 20 74 72 65 61 74 | should |be treat|
|000021c0| 65 64 20 64 69 66 66 65 | 72 65 6e 74 6c 79 20 74 |ed diffe|rently t|
|000021d0| 68 61 6e 20 6f 74 68 65 | 72 20 4c 41 50 20 69 6e |han othe|r LAP in|
|000021e0| 74 65 72 66 61 63 65 73 | 20 62 65 63 61 75 73 65 |terfaces| because|
|000021f0| 20 73 65 72 69 61 6c 20 | 6c 69 6e 65 73 20 61 72 | serial |lines ar|
|00002200| 65 20 75 73 65 64 20 6d | 6f 73 74 20 65 66 66 69 |e used m|ost effi|
|00002210| 63 69 65 6e 74 6c 79 20 | 62 79 20 64 69 73 63 6f |ciently |by disco|
|00002220| 6e 6e 65 63 74 69 6e 67 | 20 74 68 65 6d 20 61 66 |nnecting| them af|
|00002230| 74 65 72 20 74 68 65 20 | 6e 65 74 77 6f 72 6b 20 |ter the |network |
|00002240| 74 72 61 6e 73 61 63 74 | 69 6f 6e 20 68 61 73 20 |transact|ion has |
|00002250| 62 65 65 6e 20 63 6f 6d | 70 6c 65 74 65 64 2e 20 |been com|pleted. |
|00002260| 20 53 69 6e 63 65 20 4d | 61 63 54 43 50 20 68 61 | Since M|acTCP ha|
|00002270| 73 20 6e 6f 20 77 61 79 | 20 6f 66 20 64 65 74 65 |s no way| of dete|
|00002280| 72 6d 69 6e 69 6e 67 20 | 77 68 65 6e 20 61 20 6c |rmining |when a l|
|00002290| 69 6e 6b 20 68 61 73 20 | 62 65 63 6f 6d 65 20 69 |ink has |become i|
|000022a0| 64 6c 65 2c 20 69 74 20 | 73 68 6f 75 6c 64 20 62 |dle, it |should b|
|000022b0| 65 20 73 68 75 74 20 64 | 6f 77 6e 3b 20 74 68 65 |e shut d|own; the|
|000022c0| 72 65 66 6f 72 65 2c 20 | 74 68 65 20 73 65 72 69 |refore, |the seri|
|000022d0| 61 6c 20 6c 69 6e 6b 20 | 69 6e 74 65 72 66 61 63 |al link |interfac|
|000022e0| 65 20 73 68 6f 75 6c 64 | 20 61 73 6b 20 74 68 65 |e should| ask the|
|000022f0| 20 75 73 65 72 20 66 6f | 72 20 61 20 74 69 6d 65 | user fo|r a time|
|00002300| 20 69 6e 74 65 72 76 61 | 6c 20 74 68 61 74 20 77 | interva|l that w|
|00002310| 69 6c 6c 20 70 72 6f 6d | 70 74 20 68 69 6d 2f 68 |ill prom|pt him/h|
|00002320| 65 72 20 69 66 20 74 68 | 65 20 6c 69 6e 65 20 73 |er if th|e line s|
|00002330| 68 6f 75 6c 64 20 62 65 | 20 64 69 73 63 6f 6e 6e |hould be| disconn|
|00002340| 65 63 74 65 64 2e 20 20 | 54 68 65 20 75 73 65 72 |ected. |The user|
|00002350| 20 73 68 6f 75 6c 64 20 | 61 6c 77 61 79 73 20 62 | should |always b|
|00002360| 65 20 61 62 6c 65 20 74 | 6f 20 6f 76 65 72 72 69 |e able t|o overri|
|00002370| 64 65 20 64 69 73 63 6f | 6e 6e 65 63 74 69 6f 6e |de disco|nnection|
|00002380| 20 74 68 6f 75 67 68 20 | 69 74 20 6d 61 79 20 62 | though |it may b|
|00002390| 65 20 70 72 75 64 65 6e | 74 20 74 6f 20 66 6f 72 |e pruden|t to for|
|000023a0| 63 65 20 64 69 73 63 6f | 6e 6e 65 63 74 69 6f 6e |ce disco|nnection|
|000023b0| 20 69 66 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 | if ther|e is no |
|000023c0| 72 65 73 70 6f 6e 73 65 | 2e 0d 57 68 65 6e 20 74 |response|..When t|
|000023d0| 68 65 20 6c 69 6e 6b 20 | 68 61 73 20 64 69 73 63 |he link |has disc|
|000023e0| 6f 6e 6e 65 63 74 65 64 | 20 74 68 65 20 70 72 6f |onnected| the pro|
|000023f0| 63 65 64 75 72 65 20 70 | 61 73 73 65 64 20 69 6e |cedure p|assed in|
|00002400| 2c 20 74 68 65 20 4c 41 | 50 5f 49 6e 69 74 20 63 |, the LA|P_Init c|
|00002410| 61 6c 6c 20 73 68 6f 75 | 6c 64 20 62 65 20 63 61 |all shou|ld be ca|
|00002420| 6c 6c 65 64 20 6e 6f 74 | 69 66 79 69 6e 67 20 4d |lled not|ifying M|
|00002430| 61 63 54 43 50 20 74 68 | 61 74 20 74 68 65 20 6c |acTCP th|at the l|
|00002440| 69 6e 6b 20 69 73 20 6e | 6f 20 6c 6f 6e 67 65 72 |ink is n|o longer|
|00002450| 20 61 63 74 69 76 65 2e | 20 20 4d 61 63 54 43 50 | active.| MacTCP|
|00002460| 20 77 69 6c 6c 20 63 61 | 6c 6c 20 74 68 65 20 6c | will ca|ll the l|
|00002470| 69 6e 6b 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |ink conf|iguratio|
|00002480| 6e 20 63 61 6c 6c 20 77 | 68 65 6e 20 74 68 65 20 |n call w|hen the |
|00002490| 6c 69 6e 6b 20 69 73 20 | 74 6f 20 62 65 20 75 73 |link is |to be us|
|000024a0| 65 64 20 61 67 61 69 6e | 20 62 79 20 74 68 65 20 |ed again| by the |
|000024b0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2e 20 20 54 68 |applicat|ion. Th|
|000024c0| 69 73 20 69 6e 74 65 72 | 66 61 63 65 20 69 73 20 |is inter|face is |
|000024d0| 6e 6f 74 20 6f 6e 6c 79 | 20 6f 66 20 69 6e 74 65 |not only| of inte|
|000024e0| 72 65 73 74 20 74 6f 20 | 73 65 72 69 61 6c 20 6c |rest to |serial l|
|000024f0| 69 6e 65 73 20 62 75 74 | 20 61 6c 73 6f 20 74 6f |ines but| also to|
|00002500| 20 61 6e 79 20 69 6e 74 | 65 72 66 61 63 65 20 74 | any int|erface t|
|00002510| 68 61 74 20 6d 61 79 20 | 6e 65 65 64 20 74 6f 20 |hat may |need to |
|00002520| 62 65 20 72 65 63 6f 6e | 66 69 67 75 72 65 64 20 |be recon|figured |
|00002530| 6f 76 65 72 20 61 20 70 | 65 72 69 6f 64 20 6f 66 |over a p|eriod of|
|00002540| 20 74 69 6d 65 2e 0d 56 | 4d 20 49 73 73 75 65 73 | time..V|M Issues|
|00002550| 0d 53 79 73 74 65 6d 20 | 37 2e 30 20 77 69 6c 6c |.System |7.0 will|
|00002560| 20 6d 61 6b 65 20 76 69 | 72 74 75 61 6c 20 6d 65 | make vi|rtual me|
|00002570| 6d 6f 72 79 20 61 76 61 | 69 6c 61 62 6c 65 20 6f |mory ava|ilable o|
|00002580| 6e 20 4d 61 63 69 6e 74 | 6f 73 68 20 63 6f 6d 70 |n Macint|osh comp|
|00002590| 75 74 65 72 73 2e 20 20 | 4d 61 63 54 43 50 20 65 |uters. |MacTCP e|
|000025a0| 78 70 65 63 74 73 20 74 | 68 61 74 20 61 6c 6c 20 |xpects t|hat all |
|000025b0| 63 61 6c 6c 73 20 74 6f | 20 76 69 72 74 75 61 6c |calls to| virtual|
|000025c0| 20 6d 65 6d 6f 72 79 20 | 77 69 6c 6c 20 62 65 20 | memory |will be |
|000025d0| 6d 61 64 65 20 61 73 20 | 61 20 64 65 66 65 72 72 |made as |a deferr|
|000025e0| 65 64 20 66 75 6e 63 74 | 69 6f 6e 20 63 61 6c 6c |ed funct|ion call|
|000025f0| 2e 20 20 54 68 65 20 66 | 75 6e 63 74 69 6f 6e 61 |. The f|unctiona|
|00002600| 6c 20 73 70 65 63 69 66 | 69 63 61 74 69 6f 6e 20 |l specif|ication |
|00002610| 66 6f 72 20 56 4d 20 67 | 6f 65 73 20 69 6e 74 6f |for VM g|oes into|
|00002620| 20 67 72 65 61 74 65 72 | 20 64 65 74 61 69 6c 20 | greater| detail |
|00002630| 6f 6e 20 74 68 65 20 64 | 65 74 61 69 6c 73 2e 20 |on the d|etails. |
|00002640| 20 46 6f 72 20 6d 6f 72 | 65 20 69 6e 66 6f 72 6d | For mor|e inform|
|00002650| 61 74 69 6f 6e 2c 20 73 | 65 65 20 49 6e 73 69 64 |ation, s|ee Insid|
|00002660| 65 20 4d 61 63 69 6e 74 | 6f 73 68 2c 20 56 6f 6c |e Macint|osh, Vol|
|00002670| 75 6d 65 20 56 49 2e 0d | 41 70 70 65 6e 64 69 78 |ume VI..|Appendix|
|00002680| 3a 20 20 49 6e 74 65 72 | 66 61 63 65 20 44 65 74 |: Inter|face Det|
|00002690| 61 69 6c 73 0d 54 68 69 | 73 20 61 70 70 65 6e 64 |ails.Thi|s append|
|000026a0| 69 78 20 64 65 66 69 6e | 65 73 20 74 68 65 20 70 |ix defin|es the p|
|000026b0| 72 69 6d 61 72 79 20 69 | 6e 74 65 72 66 61 63 65 |rimary i|nterface|
|000026c0| 20 62 65 74 77 65 65 6e | 20 49 50 20 61 6e 64 20 | between| IP and |
|000026d0| 74 68 65 20 4c 41 50 2e | 0d 73 74 72 75 63 74 20 |the LAP.|.struct |
|000026e0| 49 50 43 6f 6e 66 69 67 | 20 7b 7d 0d 49 50 43 6f |IPConfig| {}.IPCo|
|000026f0| 6e 66 69 67 20 68 6f 6c | 64 73 20 61 6c 6c 20 6f |nfig hol|ds all o|
|00002700| 66 20 74 68 65 20 49 50 | 20 61 6e 64 20 4c 41 50 |f the IP| and LAP|
|00002710| 2d 73 70 65 63 69 66 69 | 63 20 63 6f 6e 66 69 67 |-specifi|c config|
|00002720| 75 72 61 74 69 6f 6e 20 | 69 6e 66 6f 72 6d 61 74 |uration |informat|
|00002730| 69 6f 6e 2e 20 20 54 68 | 69 73 20 69 6e 66 6f 72 |ion. Th|is infor|
|00002740| 6d 61 74 69 6f 6e 20 69 | 73 20 72 65 61 64 20 69 |mation i|s read i|
|00002750| 6e 20 66 72 6f 6d 20 74 | 68 65 20 d4 69 70 6c 6e |n from t|he .ipln|
|00002760| d5 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |. config|uration |
|00002770| 72 65 73 6f 75 72 63 65 | 2e 0d 73 74 72 75 63 74 |resource|..struct|
|00002780| 20 49 50 43 6f 6e 66 69 | 67 20 7b 0d 09 69 6e 74 | IPConfi|g {..int|
|00002790| 09 76 65 72 73 69 6f 6e | 3b 09 2f 2a 20 76 65 72 |.version|;./* ver|
|000027a0| 73 69 6f 6e 20 6e 75 6d | 62 65 72 20 2a 2f 0d 09 |sion num|ber */..|
|000027b0| 6c 6f 6e 67 09 66 6c 61 | 67 73 3b 09 2f 2a 20 6f |long.fla|gs;./* o|
|000027c0| 70 74 69 6f 6e 73 20 66 | 6c 61 67 73 20 65 6e 61 |ptions f|lags ena|
|000027d0| 62 6c 65 64 20 66 6f 72 | 20 74 68 69 73 20 4c 41 |bled for| this LA|
|000027e0| 50 20 2a 2f 0d 09 6c 6f | 6e 67 09 64 66 6c 5f 69 |P */..lo|ng.dfl_i|
|000027f0| 70 5f 61 64 64 72 3b 09 | 2f 2a 20 64 65 66 61 75 |p_addr;.|/* defau|
|00002800| 6c 74 20 49 50 20 61 64 | 64 72 65 73 73 20 2a 2f |lt IP ad|dress */|
|00002810| 0d 09 6c 6f 6e 67 09 64 | 66 6c 5f 6e 65 74 5f 6d |..long.d|fl_net_m|
|00002820| 61 73 6b 3b 09 2f 2a 20 | 64 65 66 61 75 6c 74 20 |ask;./* |default |
|00002830| 73 75 62 6e 65 74 20 6d | 61 73 6b 20 2a 2f 0d 09 |subnet m|ask */..|
|00002840| 6c 6f 6e 67 09 64 66 6c | 5f 62 72 6f 61 64 63 61 |long.dfl|_broadca|
|00002850| 73 74 5f 6d 61 73 6b 3b | 09 2f 2a 20 64 65 66 61 |st_mask;|./* defa|
|00002860| 75 6c 74 20 62 72 6f 61 | 64 63 61 73 74 20 6d 61 |ult broa|dcast ma|
|00002870| 73 6b 20 2a 2f 0d 09 6c | 6f 6e 67 09 64 66 6c 5f |sk */..l|ong.dfl_|
|00002880| 67 77 79 5f 61 64 64 72 | 3b 09 2f 2a 20 64 65 66 |gwy_addr|;./* def|
|00002890| 61 75 6c 74 20 67 61 74 | 65 77 61 79 20 61 64 64 |ault gat|eway add|
|000028a0| 72 65 73 73 20 2a 2f 0d | 09 75 6e 73 69 67 6e 65 |ress */.|.unsigne|
|000028b0| 64 20 63 68 61 72 09 73 | 65 72 76 65 72 5f 6c 61 |d char.s|erver_la|
|000028c0| 70 5f 61 64 64 72 5b 38 | 5d 3b 09 2f 2a 20 64 65 |p_addr[8|];./* de|
|000028d0| 66 61 75 6c 74 20 73 65 | 72 76 65 72 20 6c 61 70 |fault se|rver lap|
|000028e0| 20 61 64 64 72 65 73 73 | 20 28 38 20 62 79 74 65 | address| (8 byte|
|000028f0| 73 29 20 2a 2f 0d 09 6c | 6f 6e 67 09 63 6f 6e 66 |s) */..l|ong.conf|
|00002900| 69 67 49 50 41 64 64 72 | 3b 09 2f 2a 20 6d 65 63 |igIPAddr|;./* mec|
|00002910| 68 61 6e 69 73 6d 20 62 | 79 20 77 68 69 63 68 20 |hanism b|y which |
|00002920| 49 50 20 61 64 64 72 20 | 77 61 73 20 6f 62 74 61 |IP addr |was obta|
|00002930| 69 6e 65 64 20 2a 2f 0d | 09 6c 6f 6e 67 09 63 6f |ined */.|.long.co|
|00002940| 6e 66 69 67 4e 65 74 4d | 61 73 6b 3b 09 2f 2a 20 |nfigNetM|ask;./* |
|00002950| 6d 65 63 68 61 6e 69 73 | 6d 20 62 79 20 77 68 69 |mechanis|m by whi|
|00002960| 63 68 20 6e 65 74 20 6d | 61 73 6b 20 77 61 73 20 |ch net m|ask was |
|00002970| 6f 62 74 61 69 6e 65 64 | 20 2a 2f 0d 09 6c 6f 6e |obtained| */..lon|
|00002980| 67 09 64 66 6c 5f 64 79 | 6e 5f 6c 6f 77 3b 09 2f |g.dfl_dy|n_low;./|
|00002990| 2a 20 64 79 6e 61 6d 69 | 63 20 61 64 64 72 65 73 |* dynami|c addres|
|000029a0| 73 20 66 69 65 6c 64 20 | 6c 6f 77 65 72 20 62 6f |s field |lower bo|
|000029b0| 75 6e 64 20 2a 2f 0d 09 | 6c 6f 6e 67 09 64 66 6c |und */..|long.dfl|
|000029c0| 5f 64 79 6e 5f 68 69 67 | 68 3b 09 2f 2a 20 64 79 |_dyn_hig|h;./* dy|
|000029d0| 6e 61 6d 69 63 20 61 64 | 64 72 65 73 73 20 66 69 |namic ad|dress fi|
|000029e0| 65 6c 64 20 75 70 70 65 | 72 20 62 6f 75 6e 64 20 |eld uppe|r bound |
|000029f0| 2a 2f 0d 09 53 74 72 69 | 6e 67 28 33 32 29 09 64 |*/..Stri|ng(32).d|
|00002a00| 66 6c 5f 7a 6f 6e 65 3b | 09 2f 2a 20 41 70 70 6c |fl_zone;|./* Appl|
|00002a10| 65 54 61 6c 6b 20 67 61 | 74 65 77 61 79 20 7a 6f |eTalk ga|teway zo|
|00002a20| 6e 65 20 2a 2f 0d 09 2f | 2a 20 61 6c 69 67 6e 20 |ne */../|* align |
|00002a30| 74 6f 20 77 6f 72 64 20 | 2a 2f 0d 09 42 6f 6f 6c |to word |*/..Bool|
|00002a40| 65 61 6e 20 09 6c 6f 61 | 64 3b 09 2f 2a 20 74 72 |ean .loa|d;./* tr|
|00002a50| 75 65 20 2d 20 6c 6f 61 | 64 20 64 72 69 76 65 72 |ue - loa|d driver|
|00002a60| 20 69 6e 74 6f 20 73 79 | 73 74 65 6d 20 2a 2f 0d | into sy|stem */.|
|00002a70| 09 42 6f 6f 6c 65 61 6e | 09 61 64 6d 69 6e 3b 09 |.Boolean|.admin;.|
|00002a80| 2f 2a 20 74 72 75 65 20 | 2d 20 61 6c 6c 6f 77 20 |/* true |- allow |
|00002a90| 61 64 6d 69 6e 20 63 64 | 65 76 20 66 75 6e 63 74 |admin cd|ev funct|
|00002aa0| 69 6f 6e 73 20 2a 2f 0d | 09 42 6f 6f 6c 65 61 6e |ions */.|.Boolean|
|00002ab0| 09 6e 65 74 4c 6f 63 6b | 3b 09 2f 2a 20 74 72 75 |.netLock|;./* tru|
|00002ac0| 65 20 2d 20 6c 6f 63 6b | 20 6e 65 74 20 6e 75 6d |e - lock| net num|
|00002ad0| 62 65 72 20 2a 2f 0d 09 | 42 6f 6f 6c 65 61 6e 09 |ber */..|Boolean.|
|00002ae0| 73 75 62 6e 65 74 4c 6f | 63 6b 3b 09 2f 2a 20 74 |subnetLo|ck;./* t|
|00002af0| 72 75 65 20 2d 20 6c 6f | 63 6b 20 73 75 62 6e 65 |rue - lo|ck subne|
|00002b00| 74 20 6e 75 6d 62 65 72 | 20 2a 2f 0d 09 42 6f 6f |t number| */..Boo|
|00002b10| 6c 65 61 6e 09 6e 6f 64 | 65 4c 6f 63 6b 3b 09 2f |lean.nod|eLock;./|
|00002b20| 2a 20 74 72 75 65 20 2d | 20 6c 6f 63 6b 20 6e 6f |* true -| lock no|
|00002b30| 64 65 20 6e 75 6d 62 65 | 72 20 2a 2f 0d 09 42 6f |de numbe|r */..Bo|
|00002b40| 6f 6c 65 61 6e 09 66 69 | 6c 6c 65 72 31 3b 09 2f |olean.fi|ller1;./|
|00002b50| 2a 20 66 69 6c 6c 65 72 | 20 2a 2f 0d 09 69 6e 74 |* filler| */..int|
|00002b60| 20 09 61 63 74 69 76 65 | 4c 61 70 3b 09 2f 2a 20 | .active|Lap;./* |
|00002b70| 49 44 20 6f 66 20 4c 41 | 50 20 2a 2f 0d 09 09 09 |ID of LA|P */....|
|00002b80| 2f 2a 20 62 75 69 6c 74 | 69 6e 3a 20 31 32 38 20 |/* built|in: 128 |
|00002b90| 2d 20 41 70 70 6c 65 54 | 61 6c 6b 2c 20 31 32 39 |- AppleT|alk, 129|
|00002ba0| 20 2d 20 45 74 68 65 72 | 6e 65 74 20 2a 2f 0d 09 | - Ether|net */..|
|00002bb0| 69 6e 74 09 73 6c 6f 74 | 3b 09 2f 2a 20 73 6c 6f |int.slot|;./* slo|
|00002bc0| 74 20 6e 75 6d 62 65 72 | 20 69 66 20 4d 61 63 20 |t number| if Mac |
|00002bd0| 49 49 20 2a 2f 0d 09 53 | 74 72 69 6e 67 28 33 32 |II */..S|tring(32|
|00002be0| 29 09 66 69 6c 65 6e 61 | 6d 65 3b 09 2f 2a 20 66 |).filena|me;./* f|
|00002bf0| 69 6c 65 20 6e 61 6d 65 | 20 69 66 20 65 78 74 65 |ile name| if exte|
|00002c00| 72 6e 61 6c 20 6e 65 74 | 20 69 6e 74 65 72 66 61 |rnal net| interfa|
|00002c10| 63 65 20 2a 2f 0d 09 7d | 3b 0d 23 64 65 66 69 6e |ce */..}|;.#defin|
|00002c20| 65 20 53 74 72 69 6e 67 | 28 73 69 7a 65 29 20 73 |e String|(size) s|
|00002c30| 74 72 75 63 74 20 7b 75 | 6e 73 69 67 6e 65 64 20 |truct {u|nsigned |
|00002c40| 63 68 61 72 20 6c 65 6e | 67 74 68 3b 20 75 6e 73 |char len|gth; uns|
|00002c50| 69 67 6e 65 64 20 63 68 | 61 72 20 74 65 78 74 5b |igned ch|ar text[|
|00002c60| 73 69 7a 65 5d 3b 7d 0d | 23 64 65 66 69 6e 65 20 |size];}.|#define |
|00002c70| 69 70 42 61 64 57 44 53 | 65 72 72 09 2d 32 33 30 |ipBadWDS|err.-230|
|00002c80| 33 34 09 2f 2a 20 65 72 | 72 6f 72 20 69 6e 20 57 |34./* er|ror in W|
|00002c90| 44 53 20 66 6f 72 6d 61 | 74 20 2a 2f 0d 54 68 65 |DS forma|t */.The|
|00002ca0| 20 66 6c 61 67 73 20 66 | 69 65 6c 64 20 68 61 73 | flags f|ield has|
|00002cb0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 64 | the fol|lowing d|
|00002cc0| 65 66 69 6e 65 64 20 76 | 61 6c 75 65 73 3a 0d 23 |efined v|alues:.#|
|00002cd0| 64 65 66 69 6e 65 20 75 | 73 65 46 69 78 65 64 41 |define u|seFixedA|
|00002ce0| 64 64 72 09 30 78 38 30 | 30 09 2f 2a 20 75 73 65 |ddr.0x80|0./* use|
|00002cf0| 64 20 66 69 78 65 64 20 | 6e 6f 64 65 20 61 64 64 |d fixed |node add|
|00002d00| 72 65 73 73 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |ress */.|#define |
|00002d10| 75 73 65 44 79 6e 61 6d | 69 63 09 30 78 34 30 30 |useDynam|ic.0x400|
|00002d20| 09 2f 2a 20 70 69 63 6b | 20 6e 6f 64 65 20 61 64 |./* pick| node ad|
|00002d30| 64 72 65 73 73 20 64 79 | 6e 61 6d 69 63 61 6c 6c |dress dy|namicall|
|00002d40| 79 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 75 73 65 |y */.#de|fine use|
|00002d50| 52 41 52 50 09 30 78 32 | 30 30 09 2f 2a 20 75 73 |RARP.0x2|00./* us|
|00002d60| 65 20 72 65 76 65 72 73 | 65 2d 41 52 50 20 74 6f |e revers|e-ARP to|
|00002d70| 20 67 65 74 20 49 50 20 | 61 64 64 72 65 73 73 20 | get IP |address |
|00002d80| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 75 73 65 53 4d |*/.#defi|ne useSM|
|00002d90| 51 09 30 78 31 30 30 09 | 2f 2a 20 75 73 65 20 49 |Q.0x100.|/* use I|
|00002da0| 43 4d 50 20 73 75 62 6e | 65 74 20 6d 61 73 6b 20 |CMP subn|et mask |
|00002db0| 71 75 65 72 79 20 70 61 | 63 6b 65 74 20 2a 2f 0d |query pa|cket */.|
|00002dc0| 23 64 65 66 69 6e 65 20 | 75 73 65 42 6f 6f 74 50 |#define |useBootP|
|00002dd0| 09 30 78 34 30 0d 23 64 | 65 66 69 6e 65 20 75 73 |.0x40.#d|efine us|
|00002de0| 65 4b 49 50 47 57 09 30 | 78 30 30 38 09 2f 2a 20 |eKIPGW.0|x008./* |
|00002df0| 75 73 65 20 61 20 4b 49 | 50 20 67 61 74 65 77 61 |use a KI|P gatewa|
|00002e00| 79 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 75 73 65 |y */.#de|fine use|
|00002e10| 46 69 78 65 64 47 57 09 | 30 78 30 30 34 09 2f 2a |FixedGW.|0x004./*|
|00002e20| 20 75 73 65 20 66 69 78 | 65 64 20 67 61 74 65 77 | use fix|ed gatew|
|00002e30| 61 79 20 61 64 64 72 65 | 73 73 20 2a 2f 0d 23 64 |ay addre|ss */.#d|
|00002e40| 65 66 69 6e 65 20 75 73 | 65 52 49 50 09 30 78 30 |efine us|eRIP.0x0|
|00002e50| 30 32 09 2f 2a 20 75 73 | 65 20 52 49 50 20 74 6f |02./* us|e RIP to|
|00002e60| 20 66 69 6e 64 20 67 61 | 74 65 77 61 79 73 2a 2f | find ga|teways*/|
|00002e70| 0d 23 64 65 66 69 6e 65 | 20 75 73 65 50 72 6f 78 |.#define| useProx|
|00002e80| 79 41 52 50 09 30 78 30 | 30 31 09 2f 2a 20 75 73 |yARP.0x0|01./* us|
|00002e90| 65 20 70 72 6f 78 79 2d | 41 52 50 20 6f 6e 20 74 |e proxy-|ARP on t|
|00002ea0| 68 69 73 20 6e 65 74 20 | 2a 2f 0d 73 74 72 75 63 |his net |*/.struc|
|00002eb0| 74 20 4c 41 50 49 6e 66 | 6f 20 7b 7d 0d 4c 41 50 |t LAPInf|o {}.LAP|
|00002ec0| 49 6e 66 6f 20 69 73 20 | 61 6c 6c 6f 63 61 74 65 |Info is |allocate|
|00002ed0| 64 20 64 75 72 69 6e 67 | 20 73 79 73 74 65 6d 20 |d during| system |
|00002ee0| 73 74 61 72 74 2d 75 70 | 20 61 6e 64 20 68 6f 6c |start-up| and hol|
|00002ef0| 64 73 20 61 6c 6c 20 6f | 66 20 74 68 65 20 4c 41 |ds all o|f the LA|
|00002f00| 50 2d 73 70 65 63 69 66 | 69 63 20 69 6e 66 6f 72 |P-specif|ic infor|
|00002f10| 6d 61 74 69 6f 6e 2e 0d | 73 74 72 75 63 74 20 4c |mation..|struct L|
|00002f20| 41 50 49 4e 46 4f 20 7b | 0d 09 62 5f 33 32 09 6f |APINFO {|..b_32.o|
|00002f30| 75 72 5f 69 70 5f 61 64 | 64 72 3b 09 2f 2a 20 4c |ur_ip_ad|dr;./* L|
|00002f40| 41 50 d5 73 20 49 50 20 | 61 64 64 72 65 73 73 20 |AP.s IP |address |
|00002f50| 2a 2f 20 0d 09 62 5f 33 | 32 09 6f 75 72 5f 6e 65 |*/ ..b_3|2.our_ne|
|00002f60| 74 5f 6d 61 73 6b 3b 09 | 2f 2a 20 4c 41 50 d5 73 |t_mask;.|/* LAP.s|
|00002f70| 20 49 50 20 6e 65 74 2d | 6d 61 73 6b 20 2a 2f 0d | IP net-|mask */.|
|00002f80| 09 62 5f 33 32 09 69 70 | 5f 62 72 6f 61 64 63 61 |.b_32.ip|_broadca|
|00002f90| 73 74 5f 61 64 64 72 3b | 09 2f 2a 20 49 50 d5 73 |st_addr;|./* IP.s|
|00002fa0| 20 62 72 6f 61 64 63 61 | 73 74 20 61 64 64 72 65 | broadca|st addre|
|00002fb0| 73 73 20 2a 2f 0d 09 73 | 74 72 75 63 74 20 49 50 |ss */..s|truct IP|
|00002fc0| 43 6f 6e 66 69 67 20 09 | 6c 63 3b 09 2f 2a 20 63 |Config .|lc;./* c|
|00002fd0| 6f 70 79 20 6f 66 20 49 | 50 20 4c 41 50 20 63 6f |opy of I|P LAP co|
|00002fe0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 72 65 73 6f |nfigurat|ion reso|
|00002ff0| 75 72 63 65 20 2a 2f 0d | 09 4f 53 45 72 72 50 72 |urce */.|.OSErrPr|
|00003000| 6f 63 50 74 72 09 6c 61 | 70 49 6e 69 74 3b 09 2f |ocPtr.la|pInit;./|
|00003010| 2a 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 6f 6e 63 |* pointe|r to onc|
|00003020| 65 2d 6f 6e 6c 79 20 4c | 41 50 20 69 6e 69 74 20 |e-only L|AP init |
|00003030| 72 6f 75 74 69 6e 65 20 | 2a 2f 0d 09 4f 53 45 72 |routine |*/..OSEr|
|00003040| 72 50 72 6f 63 50 74 72 | 09 6c 61 70 4f 70 65 6e |rProcPtr|.lapOpen|
|00003050| 3b 09 2f 2a 20 4c 41 50 | 20 6f 70 65 6e 20 72 6f |;./* LAP| open ro|
|00003060| 75 74 69 6e 65 20 2a 2f | 0d 09 4f 53 45 72 72 50 |utine */|..OSErrP|
|00003070| 72 6f 63 50 74 72 09 6c | 61 70 43 6c 6f 73 65 3b |rocPtr.l|apClose;|
|00003080| 09 2f 2a 20 4c 41 50 20 | 63 6c 6f 73 65 20 72 6f |./* LAP |close ro|
|00003090| 75 74 69 6e 65 20 2a 2f | 0d 09 76 6f 69 64 50 72 |utine */|..voidPr|
|000030a0| 6f 63 50 74 72 09 6c 61 | 70 55 6e 6c 6f 61 64 3b |ocPtr.la|pUnload;|
|000030b0| 09 2f 2a 20 4c 41 50 20 | 75 6e 6c 6f 61 64 20 72 |./* LAP |unload r|
|000030c0| 6f 75 74 69 6e 65 2c 20 | 75 6e 64 6f 65 73 20 4c |outine, |undoes L|
|000030d0| 61 70 49 6e 69 74 20 2a | 2f 0d 09 4f 53 45 72 72 |apInit *|/..OSErr|
|000030e0| 50 72 6f 63 50 74 72 09 | 6c 61 70 41 74 74 61 63 |ProcPtr.|lapAttac|
|000030f0| 68 3b 09 2f 2a 20 4c 41 | 50 20 61 74 74 61 63 68 |h;./* LA|P attach|
|00003100| 20 50 48 20 72 6f 75 74 | 69 6e 65 20 2a 2f 0d 09 | PH rout|ine */..|
|00003110| 4f 53 45 72 72 50 72 6f | 63 50 74 72 09 6c 61 70 |OSErrPro|cPtr.lap|
|00003120| 44 65 74 61 63 68 3b 09 | 2f 2a 20 4c 41 50 20 64 |Detach;.|/* LAP d|
|00003130| 65 74 61 63 68 20 72 6f | 75 74 69 6e 65 20 2a 2f |etach ro|utine */|
|00003140| 0d 09 4f 53 45 72 72 50 | 72 6f 63 50 74 72 09 6c |..OSErrP|rocPtr.l|
|00003150| 61 70 4f 75 74 70 75 74 | 3b 09 2f 2a 20 4c 41 50 |apOutput|;./* LAP|
|00003160| 20 6f 75 74 70 75 74 20 | 72 6f 75 74 69 6e 65 20 | output |routine |
|00003170| 2a 2f 0d 09 4f 53 45 72 | 72 50 72 6f 63 50 74 72 |*/..OSEr|rProcPtr|
|00003180| 09 6c 61 70 43 6f 6e 74 | 72 6f 6c 3b 09 2f 2a 20 |.lapCont|rol;./* |
|00003190| 4c 41 50 20 63 6f 6e 74 | 72 6f 6c 20 72 6f 75 74 |LAP cont|rol rout|
|000031a0| 69 6e 65 20 2a 2f 0d 09 | 76 6f 69 64 50 72 6f 63 |ine */..|voidProc|
|000031b0| 50 74 72 09 6c 61 70 46 | 61 75 6c 74 3b 09 2f 2a |Ptr.lapF|ault;./*|
|000031c0| 20 4c 41 50 20 66 61 75 | 6c 74 20 69 73 6f 6c 61 | LAP fau|lt isola|
|000031d0| 74 69 6f 6e 20 72 6f 75 | 74 69 6e 65 20 2a 2f 0d |tion rou|tine */.|
|000031e0| 09 4f 53 45 72 72 50 72 | 6f 63 50 74 72 09 6c 61 |.OSErrPr|ocPtr.la|
|000031f0| 70 53 74 61 74 69 73 74 | 69 63 73 3b 09 2f 2a 20 |pStatist|ics;./* |
|00003200| 4c 41 50 20 73 74 61 74 | 69 73 74 69 63 20 72 65 |LAP stat|istic re|
|00003210| 61 64 69 6e 67 20 72 6f | 75 74 69 6e 65 20 2a 2f |ading ro|utine */|
|00003220| 0d 09 76 6f 69 64 50 72 | 6f 63 50 74 72 09 6c 61 |..voidPr|ocPtr.la|
|00003230| 70 43 6f 6e 66 69 67 75 | 72 65 3b 09 2f 2a 20 4c |pConfigu|re;./* L|
|00003240| 41 50 2d 73 70 65 63 69 | 66 69 63 20 63 6f 6e 66 |AP-speci|fic conf|
|00003250| 69 67 75 72 61 74 69 6f | 6e 20 72 6f 75 74 69 6e |iguratio|n routin|
|00003260| 65 73 20 2a 2f 0d 09 42 | 6f 6f 6c 65 61 6e 50 72 |es */..B|ooleanPr|
|00003270| 6f 63 50 74 72 09 6c 61 | 70 50 72 6f 62 65 3b 09 |ocPtr.la|pProbe;.|
|00003280| 2f 2a 20 73 65 6e 64 20 | 61 20 4c 41 50 2d 73 70 |/* send |a LAP-sp|
|00003290| 65 63 69 66 69 63 20 61 | 64 64 72 65 73 73 20 70 |ecific a|ddress p|
|000032a0| 72 6f 62 65 20 70 61 63 | 6b 65 74 20 2a 2f 0d 09 |robe pac|ket */..|
|000032b0| 42 6f 6f 6c 65 61 6e 50 | 72 6f 63 50 74 72 09 6c |BooleanP|rocPtr.l|
|000032c0| 61 70 52 65 67 69 73 74 | 65 72 3b 09 2f 2a 20 72 |apRegist|er;./* r|
|000032d0| 65 67 69 73 74 65 72 20 | 6f 75 72 20 49 50 20 61 |egister |our IP a|
|000032e0| 64 64 72 65 73 73 20 6f | 6e 20 74 68 65 20 6e 65 |ddress o|n the ne|
|000032f0| 74 77 6f 72 6b 20 2a 2f | 0d 09 76 6f 69 64 50 72 |twork */|..voidPr|
|00003300| 6f 63 50 74 72 09 6c 61 | 70 46 69 6e 64 47 61 74 |ocPtr.la|pFindGat|
|00003310| 65 77 61 79 3b 09 2f 2a | 20 4c 41 50 2d 73 70 65 |eway;./*| LAP-spe|
|00003320| 63 69 66 69 63 20 6d 65 | 61 6e 73 20 6f 66 20 66 |cific me|ans of f|
|00003330| 69 6e 64 69 6e 67 20 61 | 20 67 61 74 65 77 61 79 |inding a| gateway|
|00003340| 20 2a 2f 0d 09 42 6f 6f | 6c 65 61 6e 50 72 6f 63 | */..Boo|leanProc|
|00003350| 50 74 72 09 6c 61 70 47 | 77 79 43 68 65 63 6b 3b |Ptr.lapG|wyCheck;|
|00003360| 09 2f 2a 20 4c 41 50 2d | 73 70 65 63 69 66 69 63 |./* LAP-|specific|
|00003370| 20 6d 65 61 6e 73 20 6f | 66 20 76 65 72 69 66 79 | means o|f verify|
|00003380| 69 6e 67 20 67 61 74 65 | 77 61 79 20 75 70 20 2a |ing gate|way up *|
|00003390| 2f 0d 09 2f 2a 20 49 50 | 20 70 61 72 61 6d 65 74 |/../* IP| paramet|
|000033a0| 65 72 73 20 2a 2f 09 0d | 09 69 70 5f 61 64 64 72 |ers */..|.ip_addr|
|000033b0| 09 64 66 6c 5f 64 6e 73 | 5f 61 64 64 72 3b 09 2f |.dfl_dns|_addr;./|
|000033c0| 2a 20 61 64 64 72 65 73 | 73 20 6f 66 20 44 4e 53 |* addres|s of DNS|
|000033d0| 20 66 72 6f 6d 20 63 6f | 6e 66 69 67 20 70 72 6f | from co|nfig pro|
|000033e0| 74 6f 63 6f 6c 20 2a 2f | 0d 09 48 61 6e 64 6c 65 |tocol */|..Handle|
|000033f0| 09 64 6e 73 6c 48 6e 64 | 6c 3b 09 2f 2a 20 68 61 |.dnslHnd|l;./* ha|
|00003400| 6e 64 6c 65 20 74 6f 20 | 44 4e 53 20 63 6f 6e 66 |ndle to |DNS conf|
|00003410| 69 67 75 72 61 74 69 6f | 6e 20 72 65 73 6f 75 72 |iguratio|n resour|
|00003420| 63 65 20 2a 2f 0d 09 50 | 74 72 09 64 6e 73 43 61 |ce */..P|tr.dnsCa|
|00003430| 63 68 65 3b 09 2f 2a 20 | 70 6f 69 6e 74 65 72 20 |che;./* |pointer |
|00003440| 74 6f 20 73 70 61 63 65 | 20 61 6c 6c 6f 63 61 74 |to space| allocat|
|00003450| 65 64 20 66 6f 72 20 64 | 6e 73 20 63 61 63 68 65 |ed for d|ns cache|
|00003460| 20 2a 2f 0d 09 69 6e 74 | 09 64 6e 73 43 61 63 68 | */..int|.dnsCach|
|00003470| 65 53 69 7a 65 3b 09 2f | 2a 20 73 69 7a 65 20 6f |eSize;./|* size o|
|00003480| 66 20 63 61 63 68 65 20 | 61 6c 6c 6f 63 61 74 65 |f cache |allocate|
|00003490| 64 2c 20 69 6e 20 62 79 | 74 65 73 20 2a 2f 0d 09 |d, in by|tes */..|
|000034a0| 2f 2a 20 4c 41 50 20 70 | 61 72 61 6d 65 74 65 72 |/* LAP p|arameter|
|000034b0| 73 20 2a 2f 09 0d 09 69 | 6e 74 09 68 65 61 64 65 |s */...i|nt.heade|
|000034c0| 72 53 69 7a 65 3b 09 2f | 2a 20 4c 41 50 20 68 65 |rSize;./|* LAP he|
|000034d0| 61 64 65 72 20 73 70 61 | 63 65 20 72 65 71 75 69 |ader spa|ce requi|
|000034e0| 72 65 6d 65 6e 74 73 20 | 2a 2f 0d 09 69 6e 74 09 |rements |*/..int.|
|000034f0| 74 72 61 69 6c 65 72 53 | 69 7a 65 3b 09 2f 2a 20 |trailerS|ize;./* |
|00003500| 4c 41 50 20 74 72 61 69 | 6c 65 72 20 73 70 61 63 |LAP trai|ler spac|
|00003510| 65 20 72 65 71 75 69 72 | 65 6d 65 6e 74 73 20 2a |e requir|ements *|
|00003520| 2f 0d 09 69 6e 74 09 6f | 75 74 4d 61 78 50 61 63 |/..int.o|utMaxPac|
|00003530| 6b 65 74 53 69 7a 65 3b | 09 2f 2a 20 73 69 7a 65 |ketSize;|./* size|
|00003540| 20 6f 66 20 6d 61 78 69 | 6d 75 6d 20 6f 75 74 70 | of maxi|mum outp|
|00003550| 75 74 20 70 61 63 6b 65 | 74 20 2a 2f 0d 09 69 6e |ut packe|t */..in|
|00003560| 74 09 69 6e 4d 61 78 50 | 61 63 6b 65 74 53 69 7a |t.inMaxP|acketSiz|
|00003570| 65 3b 09 2f 2a 20 73 69 | 7a 65 20 6f 66 20 6d 61 |e;./* si|ze of ma|
|00003580| 78 69 6d 75 6d 20 69 6e | 70 75 74 20 70 61 63 6b |ximum in|put pack|
|00003590| 65 74 20 2a 2f 0d 09 69 | 6e 74 09 6d 61 78 44 61 |et */..i|nt.maxDa|
|000035a0| 74 61 53 69 7a 65 3b 09 | 2f 2a 20 73 69 7a 65 20 |taSize;.|/* size |
|000035b0| 6f 66 20 6d 61 78 69 6d | 75 6d 20 64 61 74 61 20 |of maxim|um data |
|000035c0| 70 61 63 6b 65 74 20 2a | 2f 0d 09 69 6e 74 09 6e |packet *|/..int.n|
|000035d0| 75 6d 43 6f 6e 6e 65 63 | 74 69 6f 6e 73 3b 09 2f |umConnec|tions;./|
|000035e0| 2a 20 6e 75 6d 62 65 72 | 20 6f 66 20 73 65 70 61 |* number| of sepa|
|000035f0| 72 61 74 65 20 6e 65 74 | 77 6f 72 6b 20 63 6f 6e |rate net|work con|
|00003600| 6e 65 63 74 69 6f 6e 73 | 20 2a 2f 0d 09 75 6e 73 |nections| */..uns|
|00003610| 69 67 6e 65 64 20 6c 6f | 6e 67 09 76 65 72 73 69 |igned lo|ng.versi|
|00003620| 6f 6e 46 6c 61 67 73 3b | 09 2f 2a 20 76 65 72 73 |onFlags;|./* vers|
|00003630| 69 6f 6e 20 6e 75 6d 62 | 65 72 20 66 6c 61 67 73 |ion numb|er flags|
|00003640| 20 2a 2f 0d 09 76 6f 69 | 64 50 72 6f 63 50 74 72 | */..voi|dProcPtr|
|00003650| 09 69 70 5f 70 68 3b 09 | 2f 2a 20 70 6f 69 6e 74 |.ip_ph;.|/* point|
|00003660| 65 72 20 74 6f 20 49 50 | d5 73 20 70 72 6f 74 6f |er to IP|.s proto|
|00003670| 63 6f 6c 20 68 61 6e 64 | 6c 65 72 20 2a 2f 0d 09 |col hand|ler */..|
|00003680| 50 74 72 09 69 70 47 6c | 6f 62 61 6c 73 3b 09 2f |Ptr.ipGl|obals;./|
|00003690| 2a 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 49 50 d5 |* pointe|r to IP.|
|000036a0| 73 20 41 35 20 2a 2f 0d | 09 73 68 6f 72 74 09 6c |s A5 */.|.short.l|
|000036b0| 69 6e 6b 5f 75 6e 69 74 | 3b 09 2f 2a 20 75 6e 69 |ink_unit|;./* uni|
|000036c0| 74 20 6e 75 6d 62 65 72 | 20 6f 66 20 6c 69 6e 6b |t number| of link|
|000036d0| 20 64 72 69 76 65 72 20 | 2a 2f 0d 09 42 6f 6f 6c | driver |*/..Bool|
|000036e0| 65 61 6e 20 09 61 64 64 | 72 65 73 73 43 6f 6e 66 |ean .add|ressConf|
|000036f0| 6c 69 63 74 3b 09 2f 2a | 20 54 52 55 45 20 69 66 |lict;./*| TRUE if|
|00003700| 20 61 64 64 72 65 73 73 | 20 63 6f 6e 66 6c 69 63 | address| conflic|
|00003710| 74 20 64 69 73 63 6f 76 | 65 72 65 64 20 2a 2f 0d |t discov|ered */.|
|00003720| 09 69 6e 74 09 6c 61 70 | 54 79 70 65 3b 09 2f 2a |.int.lap|Type;./*|
|00003730| 20 49 50 20 4c 41 50 20 | 68 61 72 64 77 61 72 65 | IP LAP |hardware|
|00003740| 20 74 79 70 65 20 6e 75 | 6d 62 65 72 20 2a 2f 0d | type nu|mber */.|
|00003750| 09 69 6e 74 09 6c 61 70 | 41 64 64 72 4c 65 6e 67 |.int.lap|AddrLeng|
|00003760| 74 68 3b 09 2f 2a 20 73 | 69 7a 65 20 6f 66 20 4c |th;./* s|ize of L|
|00003770| 41 50 20 61 64 64 72 65 | 73 73 20 66 69 65 6c 64 |AP addre|ss field|
|00003780| 20 2a 2f 0d 09 75 6e 73 | 69 67 6e 65 64 20 63 68 | */..uns|igned ch|
|00003790| 61 72 09 2a 6c 61 70 41 | 64 64 72 50 74 72 3b 09 |ar.*lapA|ddrPtr;.|
|000037a0| 2f 2a 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 4c 41 |/* point|er to LA|
|000037b0| 50 20 61 64 64 72 65 73 | 73 20 66 69 65 6c 64 20 |P addres|s field |
|000037c0| 2a 2f 0d 09 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |*/..unsi|gned lon|
|000037d0| 67 09 72 65 73 65 72 76 | 65 64 3b 09 2f 2a 20 4d |g.reserv|ed;./* M|
|000037e0| 61 63 54 43 50 20 72 65 | 73 65 72 76 65 64 20 66 |acTCP re|served f|
|000037f0| 69 65 6c 64 20 2a 2f 0d | 09 7d 3b 0d 41 6e 79 20 |ield */.|.};.Any |
|00003800| 65 6e 74 72 79 20 69 6e | 20 74 68 65 20 64 69 73 |entry in| the dis|
|00003810| 70 61 74 63 68 20 74 61 | 62 6c 65 20 63 61 6e 20 |patch ta|ble can |
|00003820| 62 65 20 64 65 66 69 6e | 65 64 20 61 73 20 4e 49 |be defin|ed as NI|
|00003830| 4c 3b 20 74 68 65 20 64 | 72 69 76 65 72 20 63 68 |L; the d|river ch|
|00003840| 65 63 6b 73 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |ecks bef|ore call|
|00003850| 69 6e 67 20 61 6e 79 20 | 4c 41 50 20 72 6f 75 74 |ing any |LAP rout|
|00003860| 69 6e 65 20 74 6f 20 73 | 65 65 20 69 66 20 69 74 |ine to s|ee if it|
|00003870| 20 69 73 20 64 65 66 69 | 6e 65 64 2e 20 20 54 68 | is defi|ned. Th|
|00003880| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 4c 41 50 49 |e follow|ing LAPI|
|00003890| 6e 66 6f 20 66 69 65 6c | 64 73 20 61 72 65 20 6f |nfo fiel|ds are o|
|000038a0| 66 20 69 6e 74 65 72 65 | 73 74 20 74 6f 20 74 68 |f intere|st to th|
|000038b0| 65 20 4c 41 50 20 6d 6f | 64 75 6c 65 20 64 65 76 |e LAP mo|dule dev|
|000038c0| 65 6c 6f 70 65 72 3a 0d | 6c 63 09 41 20 63 6f 70 |eloper:.|lc.A cop|
|000038d0| 79 20 6f 66 20 74 68 65 | 20 49 50 43 6f 6e 66 69 |y of the| IPConfi|
|000038e0| 67 20 72 65 63 6f 72 64 | 20 72 65 61 64 20 66 72 |g record| read fr|
|000038f0| 6f 6d 20 64 69 73 6b 2e | 20 20 54 68 65 20 6f 6e |om disk.| The on|
|00003900| 6c 79 20 66 69 65 6c 64 | 73 20 6f 66 20 69 6e 74 |ly field|s of int|
|00003910| 65 72 65 73 74 20 61 72 | 65 20 74 68 65 20 73 6c |erest ar|e the sl|
|00003920| 6f 74 20 61 6e 64 20 64 | 66 6c 5f 67 77 79 5f 61 |ot and d|fl_gwy_a|
|00003930| 64 64 72 2e 0d 68 65 61 | 64 65 72 53 69 7a 65 09 |ddr..hea|derSize.|
|00003940| 53 69 7a 65 20 6f 66 20 | 74 68 65 20 4c 41 50 20 |Size of |the LAP |
|00003950| 6c 69 6e 6b 20 68 65 61 | 64 65 72 20 69 6e 20 62 |link hea|der in b|
|00003960| 79 74 65 73 2e 20 55 73 | 65 64 20 62 79 20 49 50 |ytes. Us|ed by IP|
|00003970| 20 74 6f 20 61 6c 6c 6f | 63 61 74 65 20 62 75 66 | to allo|cate buf|
|00003980| 66 65 72 73 2e 0d 6f 75 | 74 4d 61 78 50 61 63 6b |fers..ou|tMaxPack|
|00003990| 65 74 53 69 7a 65 20 09 | 4e 6f 74 20 63 75 72 72 |etSize .|Not curr|
|000039a0| 65 6e 74 6c 79 20 75 73 | 65 64 2e 0d 69 6e 4d 61 |ently us|ed..inMa|
|000039b0| 78 50 61 63 6b 65 74 53 | 69 7a 65 09 4e 6f 74 20 |xPacketS|ize.Not |
|000039c0| 63 75 72 72 65 6e 74 6c | 79 20 75 73 65 64 2e 0d |currentl|y used..|
|000039d0| 6d 61 78 44 61 74 61 53 | 69 7a 65 09 53 69 7a 65 |maxDataS|ize.Size|
|000039e0| 20 6f 66 20 74 68 65 20 | 6c 61 72 67 65 73 74 20 | of the |largest |
|000039f0| 49 50 20 64 61 74 61 67 | 72 61 6d 2c 20 69 6e 63 |IP datag|ram, inc|
|00003a00| 6c 75 64 69 6e 67 20 49 | 50 20 68 65 61 64 65 72 |luding I|P header|
|00003a10| 2c 20 74 68 61 74 20 63 | 61 6e 20 62 65 20 73 65 |, that c|an be se|
|00003a20| 6e 74 20 6f 76 65 72 20 | 74 68 65 20 6c 69 6e 6b |nt over |the link|
|00003a30| 2e 20 20 55 73 65 64 20 | 74 6f 20 66 72 61 67 6d |. Used |to fragm|
|00003a40| 65 6e 74 20 6f 75 74 67 | 6f 69 6e 67 20 70 61 63 |ent outg|oing pac|
|00003a50| 6b 65 74 73 2e 0d 6c 61 | 70 54 79 70 65 09 55 73 |kets..la|pType.Us|
|00003a60| 65 64 20 74 6f 20 63 6f | 6e 73 74 72 75 63 74 20 |ed to co|nstruct |
|00003a70| 4c 41 50 2d 69 6e 64 65 | 70 65 6e 64 65 6e 74 20 |LAP-inde|pendent |
|00003a80| 42 6f 6f 74 50 20 72 65 | 71 75 65 73 74 73 2c 20 |BootP re|quests, |
|00003a90| 6c 61 70 54 79 70 65 20 | 69 73 20 74 68 65 20 74 |lapType |is the t|
|00003aa0| 79 70 65 20 6f 66 20 4c | 41 50 20 61 64 64 72 65 |ype of L|AP addre|
|00003ab0| 73 73 20 69 6e 20 74 68 | 65 20 42 6f 6f 74 50 20 |ss in th|e BootP |
|00003ac0| 72 65 71 75 65 73 74 20 | 70 61 63 6b 65 74 2e 0d |request |packet..|
|00003ad0| 6c 61 70 41 64 64 72 4c | 65 6e 67 74 68 09 55 73 |lapAddrL|ength.Us|
|00003ae0| 65 64 20 74 6f 20 63 6f | 6e 73 74 72 75 63 74 20 |ed to co|nstruct |
|00003af0| 4c 41 50 2d 69 6e 64 65 | 70 65 6e 64 65 6e 74 20 |LAP-inde|pendent |
|00003b00| 42 6f 6f 74 50 20 72 65 | 71 75 65 73 74 73 2c 20 |BootP re|quests, |
|00003b10| 6c 61 70 41 64 64 72 4c | 65 6e 67 74 68 20 69 73 |lapAddrL|ength is|
|00003b20| 20 74 68 65 20 6c 65 6e | 67 74 68 2c 20 69 6e 20 | the len|gth, in |
|00003b30| 62 79 74 65 73 2c 20 6f | 66 20 74 68 65 20 4c 41 |bytes, o|f the LA|
|00003b40| 50 20 61 64 64 72 65 73 | 73 20 69 6e 20 74 68 65 |P addres|s in the|
|00003b50| 20 42 6f 6f 74 50 20 72 | 65 71 75 65 73 74 20 70 | BootP r|equest p|
|00003b60| 61 63 6b 65 74 2e 0d 6c | 61 70 41 64 64 72 50 74 |acket..l|apAddrPt|
|00003b70| 72 09 55 73 65 64 20 74 | 6f 20 63 6f 6e 73 74 72 |r.Used t|o constr|
|00003b80| 75 63 74 20 4c 41 50 2d | 69 6e 64 65 70 65 6e 64 |uct LAP-|independ|
|00003b90| 65 6e 74 20 42 6f 6f 74 | 50 20 72 65 71 75 65 73 |ent Boot|P reques|
|00003ba0| 74 73 2c 20 74 68 69 73 | 20 70 6f 69 6e 74 73 20 |ts, this| points |
|00003bb0| 74 6f 20 74 68 65 20 4c | 41 50 d5 73 20 6c 69 6e |to the L|AP.s lin|
|00003bc0| 6b 20 61 64 64 72 65 73 | 73 2e 0d 69 70 47 6c 6f |k addres|s..ipGlo|
|00003bd0| 62 61 6c 73 09 54 68 65 | 20 4c 41 50 20 6d 75 73 |bals.The| LAP mus|
|00003be0| 74 20 65 6e 73 75 72 65 | 20 74 68 61 74 20 49 50 |t ensure| that IP|
|00003bf0| d5 73 20 72 65 67 69 73 | 74 65 72 20 41 35 20 28 |.s regis|ter A5 (|
|00003c00| 67 6c 6f 62 61 6c 20 64 | 61 74 61 20 70 6f 69 6e |global d|ata poin|
|00003c10| 74 65 72 29 20 69 73 20 | 73 65 74 20 75 70 20 62 |ter) is |set up b|
|00003c20| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00003c30| 65 20 49 50 20 70 61 63 | 6b 65 74 20 72 65 63 65 |e IP pac|ket rece|
|00003c40| 70 74 69 6f 6e 20 6f 72 | 20 77 72 69 74 65 20 63 |ption or| write c|
|00003c50| 6f 6d 70 6c 65 74 69 6f | 6e 20 72 6f 75 74 69 6e |ompletio|n routin|
|00003c60| 65 73 2e 0d 61 64 64 72 | 65 73 73 43 6f 6e 66 6c |es..addr|essConfl|
|00003c70| 69 63 74 09 41 20 66 6c | 61 67 20 62 79 20 77 68 |ict.A fl|ag by wh|
|00003c80| 69 63 68 20 74 68 65 20 | 4c 41 50 20 63 61 6e 20 |ich the |LAP can |
|00003c90| 63 6f 6d 6d 75 6e 69 63 | 61 74 65 20 62 61 63 6b |communic|ate back|
|00003ca0| 20 74 6f 20 49 50 20 74 | 68 61 74 20 61 6e 6f 74 | to IP t|hat anot|
|00003cb0| 68 65 72 20 6e 6f 64 65 | 20 69 73 20 75 73 69 6e |her node| is usin|
|00003cc0| 67 20 74 68 65 20 73 61 | 6d 65 20 49 50 20 61 64 |g the sa|me IP ad|
|00003cd0| 64 72 65 73 73 20 77 65 | 20 61 72 65 20 75 73 69 |dress we| are usi|
|00003ce0| 6e 67 2e 20 20 54 68 69 | 73 20 66 6c 61 67 20 69 |ng. Thi|s flag i|
|00003cf0| 73 20 70 72 69 6d 61 72 | 69 6c 79 20 75 73 65 64 |s primar|ily used|
|00003d00| 20 64 75 72 69 6e 67 20 | 74 68 65 20 64 79 6e 61 | during |the dyna|
|00003d10| 6d 69 63 20 61 73 73 69 | 67 6e 6d 65 6e 74 20 6f |mic assi|gnment o|
|00003d20| 66 20 6e 6f 64 65 20 61 | 64 64 72 65 73 73 65 73 |f node a|ddresses|
|00003d30| 20 61 6e 64 20 61 6c 73 | 6f 20 63 68 65 63 6b 65 | and als|o checke|
|00003d40| 64 20 61 66 74 65 72 20 | 61 20 63 61 6c 6c 20 74 |d after |a call t|
|00003d50| 6f 20 74 68 65 20 4c 41 | 50 5f 72 65 67 69 73 74 |o the LA|P_regist|
|00003d60| 65 72 20 72 6f 75 74 69 | 6e 65 20 28 73 65 65 20 |er routi|ne (see |
|00003d70| 62 65 6c 6f 77 29 2e 0d | 73 74 72 75 63 74 20 49 |below)..|struct I|
|00003d80| 50 42 75 66 20 7b 7d 0d | 54 68 65 20 49 50 42 75 |PBuf {}.|The IPBu|
|00003d90| 66 20 69 73 20 74 68 65 | 20 73 74 61 6e 64 61 72 |f is the| standar|
|00003da0| 64 20 62 75 66 66 65 72 | 20 70 61 73 73 65 64 20 |d buffer| passed |
|00003db0| 62 65 74 77 65 65 6e 20 | 70 72 6f 74 6f 63 6f 6c |between |protocol|
|00003dc0| 20 6d 6f 64 75 6c 65 73 | 20 69 6e 73 69 64 65 20 | modules| inside |
|00003dd0| 4d 61 63 54 43 50 2e 20 | 20 49 74 20 69 73 20 63 |MacTCP. | It is c|
|00003de0| 6f 6d 70 6f 73 65 64 20 | 6f 66 20 61 20 4d 61 63 |omposed |of a Mac|
|00003df0| 69 6e 74 6f 73 68 20 4f | 70 65 72 61 74 69 6e 67 |intosh O|perating|
|00003e00| 20 53 79 73 74 65 6d 20 | 49 2f 4f 20 70 61 72 61 | System |I/O para|
|00003e10| 6d 65 74 65 72 20 62 6c | 6f 63 6b 2c 20 73 70 61 |meter bl|ock, spa|
|00003e20| 63 65 20 66 6f 72 20 73 | 61 76 69 6e 67 20 74 68 |ce for s|aving th|
|00003e30| 65 20 49 2f 4f 20 63 6f | 6d 70 6c 65 74 69 6f 6e |e I/O co|mpletion|
|00003e40| 20 72 6f 75 74 69 6e 65 | 20 70 6f 69 6e 74 65 72 | routine| pointer|
|00003e50| 20 6f 66 20 68 69 67 68 | 65 72 20 70 72 6f 74 6f | of high|er proto|
|00003e60| 63 6f 6c 20 6c 65 76 65 | 6c 73 2c 20 61 6e 64 20 |col leve|ls, and |
|00003e70| 65 69 67 68 74 20 77 72 | 69 74 65 20 64 61 74 61 |eight wr|ite data|
|00003e80| 20 73 74 72 75 63 74 75 | 72 65 20 28 57 44 53 29 | structu|re (WDS)|
|00003e90| 20 65 6e 74 72 69 65 73 | 2e 20 20 54 68 65 20 57 | entries|. The W|
|00003ea0| 44 53 20 65 6e 74 72 69 | 65 73 20 66 6f 72 6d 20 |DS entri|es form |
|00003eb0| 61 20 6c 65 6e 67 74 68 | 2c 20 70 6f 69 6e 74 65 |a length|, pointe|
|00003ec0| 72 20 70 61 69 72 20 74 | 6f 20 61 6c 6c 6f 77 20 |r pair t|o allow |
|00003ed0| 4d 61 63 54 43 50 20 74 | 6f 20 67 61 74 68 65 72 |MacTCP t|o gather|
|00003ee0| 20 77 72 69 74 65 73 2e | 20 20 54 68 65 20 57 44 | writes.| The WD|
|00003ef0| 53 d5 73 20 61 72 65 20 | 74 65 72 6d 69 6e 61 74 |S.s are |terminat|
|00003f00| 65 64 20 62 79 20 61 6e | 20 65 6e 74 72 79 20 77 |ed by an| entry w|
|00003f10| 69 74 68 20 30 20 6c 65 | 6e 67 74 68 2e 20 20 0d |ith 0 le|ngth. .|
|00003f20| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 77 |typedef |struct w|
|00003f30| 64 73 45 6e 74 72 79 20 | 7b 0d 09 75 6e 73 69 67 |dsEntry |{..unsig|
|00003f40| 6e 65 64 20 73 68 6f 72 | 74 09 6c 65 6e 67 74 68 |ned shor|t.length|
|00003f50| 3b 09 2f 2a 20 6c 65 6e | 67 74 68 20 6f 66 20 62 |;./* len|gth of b|
|00003f60| 75 66 66 65 72 20 2a 2f | 0d 09 63 68 61 72 20 2a |uffer */|..char *|
|00003f70| 09 70 74 72 3b 09 2f 2a | 20 70 6f 69 6e 74 65 72 |.ptr;./*| pointer|
|00003f80| 20 74 6f 20 62 75 66 66 | 65 72 20 2a 2f 0d 09 7d | to buff|er */..}|
|00003f90| 20 77 64 73 45 6e 74 72 | 79 3b 0d 73 74 72 75 63 | wdsEntr|y;.struc|
|00003fa0| 74 20 69 63 6d 70 45 63 | 68 6f 49 6e 66 6f 20 7b |t icmpEc|hoInfo {|
|00003fb0| 0d 09 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |..unsign|ed long |
|00003fc0| 65 63 68 6f 52 65 71 75 | 65 73 74 4f 75 74 3b 0d |echoRequ|estOut;.|
|00003fd0| 09 09 2f 2a 20 74 69 6d | 65 20 69 6e 20 74 69 63 |../* tim|e in tic|
|00003fe0| 6b 73 20 6f 66 20 77 68 | 65 6e 20 74 68 65 20 65 |ks of wh|en the e|
|00003ff0| 63 68 6f 20 72 65 71 75 | 65 73 74 20 77 65 6e 74 |cho requ|est went|
|00004000| 20 6f 75 74 20 2a 2f 0d | 09 75 6e 73 69 67 6e 65 | out */.|.unsigne|
|00004010| 64 20 6c 6f 6e 67 20 65 | 63 68 6f 52 65 70 6c 79 |d long e|choReply|
|00004020| 49 6e 3b 0d 09 09 2f 2a | 20 74 69 6d 65 20 69 6e |In;.../*| time in|
|00004030| 20 74 69 63 6b 73 20 6f | 66 20 77 68 65 6e 20 74 | ticks o|f when t|
|00004040| 68 65 20 72 65 70 6c 79 | 20 77 61 73 20 72 65 63 |he reply| was rec|
|00004050| 65 69 76 65 64 20 2a 2f | 0d 09 73 74 72 75 63 74 |eived */|..struct|
|00004060| 20 72 64 73 45 6e 74 72 | 79 20 65 63 68 6f 65 64 | rdsEntr|y echoed|
|00004070| 44 61 74 61 3b 0d 09 09 | 2f 2a 20 64 61 74 61 20 |Data;...|/* data |
|00004080| 72 65 63 65 69 76 65 64 | 20 69 6e 20 72 65 73 70 |received| in resp|
|00004090| 6f 6e 63 65 20 2a 2f 0d | 09 50 74 72 20 6f 70 74 |once */.|.Ptr opt|
|000040a0| 69 6f 6e 73 3b 0d 09 09 | 2f 2a 20 49 50 20 4f 70 |ions;...|/* IP Op|
|000040b0| 74 69 6f 6e 73 20 2a 2f | 0d 09 75 6e 73 69 67 6e |tions */|..unsign|
|000040c0| 65 64 20 6c 6f 6e 67 20 | 75 73 65 72 44 61 74 61 |ed long |userData|
|000040d0| 50 74 72 3b 0d 09 09 2f | 2a 20 75 73 65 72 44 61 |Ptr;.../|* userDa|
|000040e0| 74 61 50 74 72 20 66 6f | 72 20 61 70 70 20 73 74 |taPtr fo|r app st|
|000040f0| 75 66 66 20 2a 2f 0d 09 | 7d 3b 0d 74 79 70 65 64 |uff */..|};.typed|
|00004100| 65 66 20 73 74 72 75 63 | 74 20 69 70 62 75 66 20 |ef struc|t ipbuf |
|00004110| 7b 0d 09 43 6e 74 72 6c | 50 61 72 61 6d 09 69 6f |{..Cntrl|Param.io|
|00004120| 70 3b 09 2f 2a 20 4d 41 | 43 20 4f 53 20 49 2f 4f |p;./* MA|C OS I/O|
|00004130| 20 50 61 72 61 6d 20 62 | 6c 6f 63 6b 20 2a 2f 0d | Param b|lock */.|
|00004140| 09 73 74 72 75 63 74 20 | 69 63 6d 70 45 63 68 6f |.struct |icmpEcho|
|00004150| 49 6e 66 6f 09 65 63 68 | 6f 49 6e 66 6f 3b 0d 09 |Info.ech|oInfo;..|
|00004160| 73 74 72 75 63 74 20 69 | 70 62 75 66 09 2a 73 65 |struct i|pbuf.*se|
|00004170| 67 69 70 62 3b 09 2f 2a | 20 70 6f 69 6e 74 65 72 |gipb;./*| pointer|
|00004180| 20 74 6f 20 73 65 67 6d | 65 6e 74 d5 73 20 49 50 | to segm|ent.s IP|
|00004190| 42 20 69 66 20 66 72 61 | 67 6d 65 6e 74 65 64 20 |B if fra|gmented |
|000041a0| 2a 2f 0d 09 73 74 72 75 | 63 74 20 4c 61 70 49 6e |*/..stru|ct LapIn|
|000041b0| 66 6f 20 09 2a 6c 61 70 | 3b 09 2f 2a 20 4c 41 50 |fo .*lap|;./* LAP|
|000041c0| 20 70 6f 69 6e 74 65 72 | 20 2a 2f 0d 09 50 72 6f | pointer| */..Pro|
|000041d0| 63 50 74 72 09 6c 61 70 | 5f 69 6f 63 3b 09 2f 2a |cPtr.lap|_ioc;./*|
|000041e0| 20 6c 6f 63 61 6c 20 6e | 65 74 20 63 6f 6d 70 6c | local n|et compl|
|000041f0| 65 74 69 6f 6e 20 72 6f | 75 74 69 6e 65 20 2a 2f |etion ro|utine */|
|00004200| 0d 09 50 72 6f 63 50 74 | 72 09 69 70 5f 69 6f 63 |..ProcPt|r.ip_ioc|
|00004210| 3b 09 2f 2a 20 49 50 20 | 63 6f 6d 70 6c 65 74 69 |;./* IP |completi|
|00004220| 6f 6e 20 72 6f 75 74 69 | 6e 65 20 2a 2f 0d 09 50 |on routi|ne */..P|
|00004230| 72 6f 63 50 74 72 09 74 | 70 5f 69 6f 63 3b 09 2f |rocPtr.t|p_ioc;./|
|00004240| 2a 20 74 72 61 6e 73 70 | 6f 72 74 20 63 6f 6d 70 |* transp|ort comp|
|00004250| 6c 65 74 69 6f 6e 20 72 | 6f 75 74 69 6e 65 20 2a |letion r|outine *|
|00004260| 2f 0d 09 50 72 6f 63 50 | 74 72 09 64 61 74 61 5f |/..ProcP|tr.data_|
|00004270| 69 6f 63 3b 09 2f 2a 20 | 64 61 74 61 20 49 4f 43 |ioc;./* |data IOC|
|00004280| 20 2a 2f 0d 09 73 74 72 | 75 63 74 20 77 64 73 45 | */..str|uct wdsE|
|00004290| 6e 74 72 79 09 20 6c 61 | 70 68 64 72 3b 09 2f 2a |ntry. la|phdr;./*|
|000042a0| 20 6c 6f 63 61 6c 20 6e | 65 74 20 68 65 61 64 65 | local n|et heade|
|000042b0| 72 20 2a 2f 0d 09 73 74 | 72 75 63 74 20 77 64 73 |r */..st|ruct wds|
|000042c0| 45 6e 74 72 79 09 69 70 | 3b 09 2f 2a 20 49 50 20 |Entry.ip|;./* IP |
|000042d0| 68 65 61 64 65 72 20 2a | 2f 0d 09 73 74 72 75 63 |header *|/..struc|
|000042e0| 74 20 77 64 73 45 6e 74 | 72 79 09 74 70 3b 09 2f |t wdsEnt|ry.tp;./|
|000042f0| 2a 20 54 43 50 2f 55 44 | 50 20 6f 72 20 49 43 4d |* TCP/UD|P or ICM|
|00004300| 50 20 68 65 61 64 65 72 | 20 2a 2f 0d 09 73 74 72 |P header| */..str|
|00004310| 75 63 74 20 77 64 73 45 | 6e 74 72 79 09 64 61 74 |uct wdsE|ntry.dat|
|00004320| 61 3b 09 2f 2a 20 54 43 | 50 2f 55 44 50 20 64 61 |a;./* TC|P/UDP da|
|00004330| 74 61 20 2a 2f 0d 09 73 | 74 72 75 63 74 20 77 64 |ta */..s|truct wd|
|00004340| 73 45 6e 74 72 79 09 64 | 31 3b 0d 09 73 74 72 75 |sEntry.d|1;..stru|
|00004350| 63 74 20 77 64 73 45 6e | 74 72 79 09 64 32 3b 0d |ct wdsEn|try.d2;.|
|00004360| 09 73 74 72 75 63 74 20 | 77 64 73 45 6e 74 72 79 |.struct |wdsEntry|
|00004370| 09 64 33 3b 0d 09 73 74 | 72 75 63 74 20 77 64 73 |.d3;..st|ruct wds|
|00004380| 45 6e 74 72 79 20 09 64 | 34 3b 09 2f 2a 20 38 20 |Entry .d|4;./* 8 |
|00004390| 77 64 73 20 65 6e 74 72 | 69 65 73 20 70 6c 75 73 |wds entr|ies plus|
|000043a0| 20 30 20 74 65 72 6d 69 | 6e 61 74 6f 72 20 2a 2f | 0 termi|nator */|
|000043b0| 0d 09 73 68 6f 72 74 09 | 66 6c 61 67 3b 09 2f 2a |..short.|flag;./*|
|000043c0| 20 7a 65 72 6f 20 74 65 | 72 6d 69 6e 61 74 6f 72 | zero te|rminator|
|000043d0| 20 74 6f 20 57 44 53 20 | 2a 2f 0d 09 63 68 61 72 | to WDS |*/..char|
|000043e0| 09 70 61 63 6b 65 74 5b | 5d 3b 09 2f 2a 20 73 74 |.packet[|];./* st|
|000043f0| 61 72 74 20 6f 66 20 76 | 61 72 69 61 62 6c 65 20 |art of v|ariable |
|00004400| 6c 65 6e 67 74 68 20 70 | 6b 74 20 2a 2f 0d 7d 20 |length p|kt */.} |
|00004410| 69 70 62 75 66 3b 0d 73 | 74 72 75 63 74 20 4c 41 |ipbuf;.s|truct LA|
|00004420| 50 49 6e 66 6f 20 2a 4c | 41 50 5f 6d 61 69 6e 28 |PInfo *L|AP_main(|
|00004430| 29 0d 4c 41 50 5f 6d 61 | 69 6e 20 69 73 20 63 61 |).LAP_ma|in is ca|
|00004440| 6c 6c 65 64 20 64 75 72 | 69 6e 67 20 73 79 73 74 |lled dur|ing syst|
|00004450| 65 6d 20 73 74 61 72 74 | 2d 75 70 20 74 6f 20 61 |em start|-up to a|
|00004460| 6c 6c 6f 63 61 74 65 20 | 61 20 4c 41 50 5f 49 6e |llocate |a LAP_In|
|00004470| 66 6f 20 73 74 72 75 63 | 74 75 72 65 20 61 6e 64 |fo struc|ture and|
|00004480| 20 66 69 6c 6c 20 69 6e | 20 74 68 65 20 64 69 73 | fill in| the dis|
|00004490| 70 61 74 63 68 20 74 61 | 62 6c 65 20 61 6e 64 20 |patch ta|ble and |
|000044a0| 62 61 73 69 63 20 4c 41 | 50 20 70 61 72 61 6d 65 |basic LA|P parame|
|000044b0| 74 65 72 73 2e 20 20 54 | 68 65 20 4c 41 50 5f 49 |ters. T|he LAP_I|
|000044c0| 6e 66 6f 20 73 74 72 75 | 63 74 75 72 65 20 6d 75 |nfo stru|cture mu|
|000044d0| 73 74 20 62 65 67 69 6e | 20 77 69 74 68 20 74 68 |st begin| with th|
|000044e0| 65 20 66 69 78 65 64 20 | 66 69 65 6c 64 73 20 64 |e fixed |fields d|
|000044f0| 65 66 69 6e 65 64 20 65 | 61 72 6c 69 65 72 3b 20 |efined e|arlier; |
|00004500| 68 6f 77 65 76 65 72 2c | 20 74 68 65 20 4c 41 50 |however,| the LAP|
|00004510| 20 69 73 20 66 72 65 65 | 20 74 6f 20 61 6c 6c 6f | is free| to allo|
|00004520| 63 61 74 65 20 61 64 64 | 69 74 69 6f 6e 61 6c 20 |cate add|itional |
|00004530| 6d 65 6d 6f 72 79 20 66 | 6f 6c 6c 6f 77 69 6e 67 |memory f|ollowing|
|00004540| 20 74 68 69 73 20 66 69 | 78 65 64 20 68 65 61 64 | this fi|xed head|
|00004550| 65 72 20 66 6f 72 20 6f | 74 68 65 72 20 75 73 65 |er for o|ther use|
|00004560| 73 20 73 75 63 68 20 61 | 73 20 62 75 66 66 65 72 |s such a|s buffer|
|00004570| 73 2c 20 41 52 50 20 74 | 61 62 6c 65 73 2c 20 65 |s, ARP t|ables, e|
|00004580| 74 63 2e 20 20 4c 41 50 | 5f 6d 61 69 6e 20 69 73 |tc. LAP|_main is|
|00004590| 20 6f 6e 6c 79 20 63 61 | 6c 6c 65 64 20 61 74 20 | only ca|lled at |
|000045a0| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication |
|000045b0| 6c 65 76 65 6c 2e 0d 73 | 74 72 75 63 74 20 4c 41 |level..s|truct LA|
|000045c0| 50 49 6e 66 6f 20 2a 4c | 41 50 5f 6d 61 69 6e 28 |PInfo *L|AP_main(|
|000045d0| 29 20 7b 0d 09 73 74 72 | 75 63 74 20 4c 41 50 49 |) {..str|uct LAPI|
|000045e0| 6e 66 6f 20 2a 6c 61 70 | 3b 0d 09 0d 09 6c 61 70 |nfo *lap|;....lap|
|000045f0| 20 3d 20 28 73 74 72 75 | 63 74 20 4c 41 50 49 6e | = (stru|ct LAPIn|
|00004600| 66 6f 20 2a 29 20 4e 65 | 77 50 74 72 28 73 69 7a |fo *) Ne|wPtr(siz|
|00004610| 65 6f 66 28 73 74 72 75 | 63 74 20 4c 41 50 49 6e |eof(stru|ct LAPIn|
|00004620| 66 6f 29 29 3b 0d 09 69 | 66 20 28 6c 61 70 20 21 |fo));..i|f (lap !|
|00004630| 3d 20 6e 69 6c 29 20 7b | 0d 09 09 62 7a 65 72 6f |= nil) {|...bzero|
|00004640| 28 28 50 74 72 29 6c 61 | 70 2c 20 73 69 7a 65 6f |((Ptr)la|p, sizeo|
|00004650| 66 28 73 74 72 75 63 74 | 20 4c 41 50 49 6e 66 6f |f(struct| LAPInfo|
|00004660| 29 29 3b 0d 09 0d 09 09 | 6c 61 70 2d 3e 6c 61 70 |));.....|lap->lap|
|00004670| 49 6e 69 74 20 3d 20 4c | 41 50 5f 69 6e 69 74 3b |Init = L|AP_init;|
|00004680| 0d 09 09 6c 61 70 2d 3e | 6c 61 70 4f 70 65 6e 20 |...lap->|lapOpen |
|00004690| 3d 20 4c 41 50 5f 6f 70 | 65 6e 3b 0d 09 09 6c 61 |= LAP_op|en;...la|
|000046a0| 70 2d 3e 6c 61 70 43 6c | 6f 73 65 20 3d 20 4c 41 |p->lapCl|ose = LA|
|000046b0| 50 5f 63 6c 6f 73 65 3b | 0d 09 09 6c 61 70 2d 3e |P_close;|...lap->|
|000046c0| 6c 61 70 41 74 74 61 63 | 68 20 3d 20 4c 41 50 5f |lapAttac|h = LAP_|
|000046d0| 61 74 74 61 63 68 50 48 | 3b 0d 09 09 6c 61 70 2d |attachPH|;...lap-|
|000046e0| 3e 6c 61 70 44 65 74 61 | 63 68 20 3d 20 4c 41 50 |>lapDeta|ch = LAP|
|000046f0| 5f 64 65 74 61 63 68 50 | 48 3b 0d 09 09 6c 61 70 |_detachP|H;...lap|
|00004700| 2d 3e 6c 61 70 4f 75 74 | 70 75 74 20 3d 20 4c 41 |->lapOut|put = LA|
|00004710| 50 5f 77 72 69 74 65 3b | 0d 09 09 6c 61 70 2d 3e |P_write;|...lap->|
|00004720| 6c 61 70 43 6f 6e 74 72 | 6f 6c 20 3d 20 4c 41 50 |lapContr|ol = LAP|
|00004730| 5f 63 6f 6e 74 72 6f 6c | 3b 0d 09 09 6c 61 70 2d |_control|;...lap-|
|00004740| 3e 6c 61 70 46 61 75 6c | 74 20 3d 20 4c 41 50 5f |>lapFaul|t = LAP_|
|00004750| 66 61 75 6c 74 3b 0d 09 | 09 6c 61 70 2d 3e 6c 61 |fault;..|.lap->la|
|00004760| 70 52 65 67 69 73 74 65 | 72 20 3d 20 4c 41 50 5f |pRegiste|r = LAP_|
|00004770| 72 65 67 69 73 74 65 72 | 3b 0d 09 09 6c 61 70 2d |register|;...lap-|
|00004780| 3e 6c 61 70 50 72 6f 62 | 65 20 3d 20 4c 41 50 5f |>lapProb|e = LAP_|
|00004790| 70 72 6f 62 65 3b 0d 09 | 09 6c 61 70 2d 3e 6c 61 |probe;..|.lap->la|
|000047a0| 70 43 6f 6e 66 69 67 75 | 72 65 20 3d 20 4c 41 50 |pConfigu|re = LAP|
|000047b0| 5f 63 6f 6e 66 69 67 75 | 72 65 3b 0d 09 09 6c 61 |_configu|re;...la|
|000047c0| 70 2d 3e 6c 61 70 53 74 | 61 74 69 73 74 69 63 73 |p->lapSt|atistics|
|000047d0| 20 3d 20 4c 41 50 5f 73 | 74 61 74 69 73 74 69 63 | = LAP_s|tatistic|
|000047e0| 73 3b 0d 09 09 6c 61 70 | 2d 3e 6c 61 70 46 69 6e |s;...lap|->lapFin|
|000047f0| 64 47 61 74 65 77 61 79 | 20 3d 20 6e 69 6c 3b 0d |dGateway| = nil;.|
|00004800| 09 09 6c 61 70 2d 3e 6c | 61 70 47 77 79 43 68 65 |..lap->l|apGwyChe|
|00004810| 63 6b 20 3d 20 6e 69 6c | 3b 0d 09 09 0d 09 09 6c |ck = nil|;......l|
|00004820| 61 70 2d 3e 68 65 61 64 | 65 72 53 69 7a 65 20 3d |ap->head|erSize =|
|00004830| 20 73 69 7a 65 6f 66 28 | 73 74 72 75 63 74 20 4c | sizeof(|struct L|
|00004840| 41 50 5f 68 65 61 64 65 | 72 29 3b 0d 09 09 6c 61 |AP_heade|r);...la|
|00004850| 70 2d 3e 6f 75 74 4d 61 | 78 50 61 63 6b 65 74 53 |p->outMa|xPacketS|
|00004860| 69 7a 65 20 3d 20 4d 41 | 58 5f 4c 41 50 5f 50 4b |ize = MA|X_LAP_PK|
|00004870| 54 3b 0d 09 09 6c 61 70 | 2d 3e 69 6e 4d 61 78 50 |T;...lap|->inMaxP|
|00004880| 61 63 6b 65 74 53 69 7a | 65 20 3d 20 4d 41 58 5f |acketSiz|e = MAX_|
|00004890| 4c 41 50 5f 50 4b 54 3b | 0d 09 09 6c 61 70 2d 3e |LAP_PKT;|...lap->|
|000048a0| 6d 61 78 44 61 74 61 53 | 69 7a 65 20 3d 20 4d 41 |maxDataS|ize = MA|
|000048b0| 58 5f 4c 41 50 5f 50 4b | 54 20 2d 20 73 69 7a 65 |X_LAP_PK|T - size|
|000048c0| 6f 66 28 73 74 72 75 63 | 74 20 4c 41 50 5f 68 65 |of(struc|t LAP_he|
|000048d0| 61 64 65 72 29 3b 0d 09 | 09 0d 09 09 6c 61 70 2d |ader);..|....lap-|
|000048e0| 3e 6c 61 70 54 79 70 65 | 20 3d 20 41 52 50 5f 4c |>lapType| = ARP_L|
|000048f0| 41 50 3b 0d 09 09 6c 61 | 70 2d 3e 6c 61 70 41 64 |AP;...la|p->lapAd|
|00004900| 64 72 4c 65 6e 67 74 68 | 20 3d 20 73 69 7a 65 6f |drLength| = sizeo|
|00004910| 66 28 73 74 72 75 63 74 | 20 4c 41 50 5f 61 64 64 |f(struct| LAP_add|
|00004920| 72 29 3b 0d 09 09 6c 61 | 70 2d 3e 6c 61 70 41 64 |r);...la|p->lapAd|
|00004930| 64 72 50 74 72 20 3d 20 | 28 50 74 72 29 20 26 6c |drPtr = |(Ptr) &l|
|00004940| 61 70 2d 3e 6f 75 72 5f | 6c 61 70 5f 61 64 64 72 |ap->our_|lap_addr|
|00004950| 3b 0d 09 09 0d 09 09 6c | 61 70 2d 3e 6c 61 70 5f |;......l|ap->lap_|
|00004960| 62 72 6f 61 64 63 61 73 | 74 5f 61 64 64 72 2e 65 |broadcas|t_addr.e|
|00004970| 6e 5f 68 69 20 3d 20 30 | 78 46 46 46 46 3b 0d 09 |n_hi = 0|xFFFF;..|
|00004980| 09 6c 61 70 2d 3e 6c 61 | 70 5f 62 72 6f 61 64 63 |.lap->la|p_broadc|
|00004990| 61 73 74 5f 61 64 64 72 | 2e 65 6e 5f 6c 6f 20 3d |ast_addr|.en_lo =|
|000049a0| 20 30 78 46 46 46 46 46 | 46 46 46 3b 0d 09 09 0d | 0xFFFFF|FFF;....|
|000049b0| 09 09 6c 61 70 2d 3e 69 | 70 47 6c 6f 62 61 6c 73 |..lap->i|pGlobals|
|000049c0| 20 3d 20 47 65 74 41 35 | 28 29 3b 0d 09 09 6c 61 | = GetA5|();...la|
|000049d0| 70 2d 3e 61 64 64 72 65 | 73 73 43 6f 6e 66 6c 69 |p->addre|ssConfli|
|000049e0| 63 74 20 3d 20 66 61 6c | 73 65 3b 0d 09 09 53 65 |ct = fal|se;...Se|
|000049f0| 74 4c 41 50 50 74 72 28 | 6c 61 70 29 3b 0d 09 09 |tLAPPtr(|lap);...|
|00004a00| 7d 0d 09 72 65 74 75 72 | 6e 28 6c 61 70 29 3b 0d |}..retur|n(lap);.|
|00004a10| 09 7d 0d 4f 53 45 72 72 | 20 4c 41 50 5f 69 6e 69 |.}.OSErr| LAP_ini|
|00004a20| 74 28 6c 61 70 2c 20 74 | 72 61 6e 73 69 74 69 6f |t(lap, t|ransitio|
|00004a30| 6e 50 72 6f 63 29 0d 4c | 41 50 5f 69 6e 69 74 20 |nProc).L|AP_init |
|00004a40| 69 73 20 63 61 6c 6c 65 | 64 20 62 79 20 49 50 20 |is calle|d by IP |
|00004a50| 77 68 65 6e 20 74 68 65 | 20 4d 61 63 54 43 50 20 |when the| MacTCP |
|00004a60| 64 72 69 76 65 72 20 69 | 73 20 66 69 72 73 74 20 |driver i|s first |
|00004a70| 6f 70 65 6e 65 64 2e 20 | 20 4c 41 50 5f 69 6e 69 |opened. | LAP_ini|
|00004a80| 74 20 6d 75 73 74 20 6f | 70 65 6e 20 74 68 65 20 |t must o|pen the |
|00004a90| 6c 69 6e 6b 20 68 61 72 | 64 77 61 72 65 20 64 72 |link har|dware dr|
|00004aa0| 69 76 65 72 73 2c 20 74 | 61 6b 69 6e 67 20 69 6e |ivers, t|aking in|
|00004ab0| 74 6f 20 61 63 63 6f 75 | 6e 74 20 74 68 65 20 64 |to accou|nt the d|
|00004ac0| 69 66 66 65 72 65 6e 63 | 65 73 20 62 65 74 77 65 |ifferenc|es betwe|
|00004ad0| 65 6e 20 73 79 73 74 65 | 6d 73 20 77 69 74 68 20 |en syste|ms with |
|00004ae0| 73 6c 6f 74 73 20 61 6e | 64 20 74 68 6f 73 65 20 |slots an|d those |
|00004af0| 77 69 74 68 6f 75 74 2c | 20 61 6e 64 20 64 6f 20 |without,| and do |
|00004b00| 61 6e 79 20 6f 74 68 65 | 72 20 69 6e 69 74 69 61 |any othe|r initia|
|00004b10| 6c 69 7a 61 74 69 6f 6e | 20 77 6f 72 6b 2e 20 20 |lization| work. |
|00004b20| 54 68 65 20 64 69 73 63 | 6f 6e 6e 65 63 74 50 72 |The disc|onnectPr|
|00004b30| 6f 63 20 69 73 20 74 6f | 20 62 65 20 75 73 65 64 |oc is to| be used|
|00004b40| 20 6d 61 69 6e 6c 79 20 | 77 69 74 68 20 6c 69 6e | mainly |with lin|
|00004b50| 6b 20 69 6e 74 65 72 66 | 61 63 65 73 20 74 68 61 |k interf|aces tha|
|00004b60| 74 20 6d 61 79 20 73 68 | 75 74 20 64 6f 77 6e 20 |t may sh|ut down |
|00004b70| 6f 76 65 72 20 74 69 6d | 65 2e 20 20 41 20 73 65 |over tim|e. A se|
|00004b80| 72 69 61 6c 20 6c 69 6e | 65 20 69 73 20 61 6e 20 |rial lin|e is an |
|00004b90| 65 78 61 6d 70 6c 65 20 | 6f 66 20 73 75 63 68 20 |example |of such |
|00004ba0| 61 6e 20 69 6e 74 65 72 | 66 61 63 65 2e 20 20 53 |an inter|face. S|
|00004bb0| 65 65 20 74 68 65 20 73 | 65 63 74 69 6f 6e 20 6f |ee the s|ection o|
|00004bc0| 6e 20 73 65 72 69 61 6c | 20 63 6f 6e 6e 65 63 74 |n serial| connect|
|00004bd0| 69 6f 6e 73 20 66 6f 72 | 20 6d 6f 72 65 20 64 65 |ions for| more de|
|00004be0| 74 61 69 6c 73 20 6f 6e | 20 68 6f 77 20 74 68 69 |tails on| how thi|
|00004bf0| 73 20 70 72 6f 63 65 64 | 75 72 65 20 73 68 6f 75 |s proced|ure shou|
|00004c00| 6c 64 20 62 65 20 75 73 | 65 64 2e 20 20 4c 41 50 |ld be us|ed. LAP|
|00004c10| 5f 69 6e 69 74 20 69 73 | 20 63 61 6c 6c 65 64 20 |_init is| called |
|00004c20| 61 74 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |at the a|pplicati|
|00004c30| 6f 6e 20 6c 65 76 65 6c | 2e 0d 4f 53 45 72 72 20 |on level|..OSErr |
|00004c40| 4c 41 50 5f 69 6e 69 74 | 28 6c 61 70 2c 20 74 72 |LAP_init|(lap, tr|
|00004c50| 61 6e 73 69 74 69 6f 6e | 50 72 6f 63 29 0d 73 74 |ansition|Proc).st|
|00004c60| 72 75 63 74 20 4c 41 50 | 49 6e 66 6f 20 2a 6c 61 |ruct LAP|Info *la|
|00004c70| 70 3b 0d 50 72 6f 63 50 | 74 72 20 74 72 61 6e 73 |p;.ProcP|tr trans|
|00004c80| 69 74 69 6f 6e 50 72 6f | 63 3b 0d 7b 0d 09 73 74 |itionPro|c;.{..st|
|00004c90| 72 75 63 74 20 53 70 42 | 6c 6f 63 6b 20 73 62 3b |ruct SpB|lock sb;|
|00004ca0| 0d 09 73 74 72 75 63 74 | 20 53 6c 6f 74 44 65 76 |..struct| SlotDev|
|00004cb0| 50 61 72 61 6d 20 78 70 | 62 3b 0d 09 4f 53 45 72 |Param xp|b;..OSEr|
|00004cc0| 72 09 72 63 20 3d 20 2d | 31 3b 0d 09 6c 61 70 2d |r.rc = -|1;..lap-|
|00004cd0| 3e 69 70 5f 70 68 20 3d | 20 6e 69 6c 3b 0d 09 69 |>ip_ph =| nil;..i|
|00004ce0| 66 20 28 4e 47 65 74 54 | 72 61 70 41 64 64 72 65 |f (NGetT|rapAddre|
|00004cf0| 73 73 28 53 6c 6f 74 4d | 61 6e 61 67 65 2c 4f 53 |ss(SlotM|anage,OS|
|00004d00| 54 72 61 70 29 20 21 3d | 20 0d 09 09 4e 47 65 74 |Trap) !=| ...NGet|
|00004d10| 54 72 61 70 41 64 64 72 | 65 73 73 28 55 6e 69 6d |TrapAddr|ess(Unim|
|00004d20| 70 6c 54 72 61 70 2c 4f | 53 54 72 61 70 29 29 20 |plTrap,O|STrap)) |
|00004d30| 7b 20 0d 09 09 2f 2a 20 | 72 75 6e 6e 69 6e 67 20 |{ .../* |running |
|00004d40| 6f 6e 20 61 20 73 79 73 | 74 65 6d 20 77 69 74 68 |on a sys|tem with|
|00004d50| 20 61 20 73 6c 6f 74 20 | 6d 61 6e 61 67 65 72 2c | a slot |manager,|
|00004d60| 20 64 65 74 65 72 6d 69 | 6e 65 20 77 68 69 63 68 | determi|ne which|
|00004d70| 20 73 6c 6f 74 20 63 61 | 72 64 20 69 73 20 69 6e | slot ca|rd is in|
|00004d80| 20 2a 2f 0d 09 09 2f 2a | 20 73 65 61 72 63 68 20 | */.../*| search |
|00004d90| 74 68 72 6f 75 67 68 20 | 4e 75 62 75 73 20 66 6f |through |Nubus fo|
|00004da0| 72 20 74 68 65 20 66 69 | 72 73 74 20 6e 65 74 77 |r the fi|rst netw|
|00004db0| 6f 72 6b 69 6e 67 20 63 | 61 72 64 20 2a 2f 0d 09 |orking c|ard */..|
|00004dc0| 09 62 7a 65 72 6f 28 28 | 63 68 61 72 20 2a 29 26 |.bzero((|char *)&|
|00004dd0| 73 62 2c 20 73 69 7a 65 | 6f 66 28 73 62 29 29 3b |sb, size|of(sb));|
|00004de0| 0d 09 09 73 62 2e 73 70 | 53 6c 6f 74 20 3d 20 6c |...sb.sp|Slot = l|
|00004df0| 61 70 2d 3e 6c 63 2e 73 | 6c 6f 74 3b 0d 09 09 73 |ap->lc.s|lot;...s|
|00004e00| 62 2e 73 70 43 61 74 65 | 67 6f 72 79 20 3d 20 63 |b.spCate|gory = c|
|00004e10| 61 74 4e 65 74 77 6f 72 | 6b 3b 0d 09 09 73 62 2e |atNetwor|k;...sb.|
|00004e20| 73 70 43 54 79 70 65 20 | 3d 20 74 79 70 65 45 74 |spCType |= typeEt|
|00004e30| 68 65 72 4e 65 74 3b 0d | 09 09 73 62 2e 73 70 54 |herNet;.|..sb.spT|
|00004e40| 42 4d 61 73 6b 20 3d 20 | 73 70 44 72 76 72 53 57 |BMask = |spDrvrSW|
|00004e50| 4d 61 73 6b 20 7c 20 73 | 70 44 72 76 72 48 57 4d |Mask | s|pDrvrHWM|
|00004e60| 61 73 6b 3b 0d 09 09 72 | 63 20 3d 20 53 4e 65 78 |ask;...r|c = SNex|
|00004e70| 74 54 79 70 65 53 52 73 | 72 63 28 26 73 62 29 3b |tTypeSRs|rc(&sb);|
|00004e80| 0d 09 09 69 66 20 28 28 | 6c 61 70 2d 3e 6c 63 2e |...if ((|lap->lc.|
|00004e90| 73 6c 6f 74 20 21 3d 20 | 30 29 20 26 26 20 28 73 |slot != |0) && (s|
|00004ea0| 62 2e 73 70 53 6c 6f 74 | 20 21 3d 20 6c 61 70 2d |b.spSlot| != lap-|
|00004eb0| 3e 6c 63 2e 73 6c 6f 74 | 29 29 20 7b 0d 09 09 09 |>lc.slot|)) {....|
|00004ec0| 2f 2a 20 73 6c 6f 74 20 | 6f 66 20 6e 65 74 77 6f |/* slot |of netwo|
|00004ed0| 72 6b 20 63 61 72 64 20 | 61 73 20 73 65 74 20 62 |rk card |as set b|
|00004ee0| 79 20 43 6f 6e 74 72 6f | 6c 20 50 61 6e 65 6c 2c |y Contro|l Panel,|
|00004ef0| 20 69 73 6e d5 74 20 76 | 61 6c 69 64 20 2a 2f 0d | isn.t v|alid */.|
|00004f00| 09 09 09 72 63 20 3d 20 | 73 6d 45 6d 70 74 79 53 |...rc = |smEmptyS|
|00004f10| 6c 6f 74 3b 0d 09 09 09 | 7d 0d 09 09 69 66 20 28 |lot;....|}...if (|
|00004f20| 72 63 20 3d 3d 20 6e 6f | 45 72 72 29 20 7b 0d 09 |rc == no|Err) {..|
|00004f30| 09 09 2f 2a 20 6f 70 65 | 6e 20 6c 69 6e 6b 20 68 |../* ope|n link h|
|00004f40| 61 72 64 77 61 72 65 20 | 64 72 69 76 65 72 20 2a |ardware |driver *|
|00004f50| 2f 0d 09 09 09 72 63 20 | 3d 20 4f 70 65 6e 53 6c |/....rc |= OpenSl|
|00004f60| 6f 74 28 28 50 61 72 6d | 42 6c 6b 50 74 72 29 26 |ot((Parm|BlkPtr)&|
|00004f70| 78 70 62 2c 20 66 61 6c | 73 65 29 3b 0d 09 09 09 |xpb, fal|se);....|
|00004f80| 6c 61 70 2d 3e 6c 69 6e | 6b 5f 75 6e 69 74 20 3d |lap->lin|k_unit =|
|00004f90| 20 78 70 62 2e 69 6f 52 | 65 66 4e 75 6d 3b 0d 09 | xpb.ioR|efNum;..|
|00004fa0| 09 09 7d 0d 09 09 7d 0d | 09 69 66 20 28 72 63 20 |..}...}.|.if (rc |
|00004fb0| 21 3d 20 6e 6f 45 72 72 | 29 20 7b 0d 09 09 2f 2a |!= noErr|) {.../*|
|00004fc0| 20 72 75 6e 6e 69 6e 67 | 20 6f 6e 20 6f 6c 64 65 | running| on olde|
|00004fd0| 72 20 73 79 73 74 65 6d | 2c 20 6a 75 73 74 20 74 |r system|, just t|
|00004fe0| 72 79 20 6f 70 65 6e 69 | 6e 67 20 64 72 69 76 65 |ry openi|ng drive|
|00004ff0| 72 20 75 73 69 6e 67 20 | 69 74 73 20 6e 61 6d 65 |r using |its name|
|00005000| 20 2a 2f 0d 09 09 72 63 | 20 3d 20 50 42 4f 70 65 | */...rc| = PBOpe|
|00005010| 6e 28 28 50 61 72 6d 42 | 6c 6b 50 74 72 29 26 78 |n((ParmB|lkPtr)&x|
|00005020| 70 62 2c 20 66 61 6c 73 | 65 29 3b 0d 09 09 6c 61 |pb, fals|e);...la|
|00005030| 70 2d 3e 6c 69 6e 6b 5f | 75 6e 69 74 20 3d 20 78 |p->link_|unit = x|
|00005040| 70 62 2e 69 6f 52 65 66 | 4e 75 6d 3b 0d 09 09 7d |pb.ioRef|Num;...}|
|00005050| 0d 09 69 66 20 28 72 63 | 20 3d 3d 20 6e 6f 45 72 |..if (rc| == noEr|
|00005060| 72 29 20 7b 0d 09 09 72 | 63 20 3d 20 50 42 43 6f |r) {...r|c = PBCo|
|00005070| 6e 74 72 6f 6c 28 29 3b | 09 2f 2a 20 67 65 74 20 |ntrol();|./* get |
|00005080| 6f 75 72 20 4c 41 50 20 | 61 64 64 72 65 73 73 20 |our LAP |address |
|00005090| 66 72 6f 6d 20 62 6f 61 | 72 64 20 2a 2f 0d 09 09 |from boa|rd */...|
|000050a0| 7d 0d 09 69 66 20 28 72 | 63 20 3d 3d 20 6e 6f 45 |}..if (r|c == noE|
|000050b0| 72 72 29 20 7b 0d 09 09 | 72 63 20 3d 20 50 42 43 |rr) {...|rc = PBC|
|000050c0| 6f 6e 74 72 6f 6c 28 29 | 3b 09 2f 2a 20 61 74 74 |ontrol()|;./* att|
|000050d0| 61 63 68 20 6f 75 72 20 | 70 61 63 6b 65 74 20 72 |ach our |packet r|
|000050e0| 65 61 64 20 68 61 6e 64 | 6c 65 72 20 74 6f 20 74 |ead hand|ler to t|
|000050f0| 68 65 20 64 72 69 76 65 | 72 20 2a 2f 0d 09 09 7d |he drive|r */...}|
|00005100| 0d 09 69 66 20 28 72 63 | 20 3d 3d 20 6e 6f 45 72 |..if (rc| == noEr|
|00005110| 72 29 20 7b 0d 09 09 72 | 63 20 3d 20 50 42 43 6f |r) {...r|c = PBCo|
|00005120| 6e 74 72 6f 6c 28 29 3b | 09 2f 2a 20 61 74 74 61 |ntrol();|./* atta|
|00005130| 63 68 20 6f 75 72 20 41 | 52 50 20 70 61 63 6b 65 |ch our A|RP packe|
|00005140| 74 20 72 65 61 64 20 68 | 61 6e 64 6c 65 72 20 74 |t read h|andler t|
|00005150| 6f 20 74 68 65 20 64 72 | 69 76 65 72 20 2a 2f 0d |o the dr|iver */.|
|00005160| 09 09 7d 0d 09 69 66 20 | 28 72 63 20 3d 3d 20 6e |..}..if |(rc == n|
|00005170| 6f 45 72 72 29 20 7b 09 | 0d 09 09 72 63 20 3d 20 |oErr) {.|...rc = |
|00005180| 41 52 50 5f 69 6e 69 74 | 28 6c 61 70 29 3b 09 2f |ARP_init|(lap);./|
|00005190| 2a 20 69 6e 69 74 69 61 | 6c 69 7a 65 20 20 41 52 |* initia|lize AR|
|000051a0| 50 20 68 61 6e 64 6c 65 | 72 20 2a 2f 0d 09 09 7d |P handle|r */...}|
|000051b0| 0d 09 72 65 74 75 72 6e | 28 72 63 29 3b 0d 09 7d |..return|(rc);..}|
|000051c0| 0d 54 68 65 20 74 72 61 | 6e 73 69 74 69 6f 6e 50 |.The tra|nsitionP|
|000051d0| 72 6f 63 20 69 73 20 75 | 73 65 64 20 74 6f 20 69 |roc is u|sed to i|
|000051e0| 6e 64 69 63 61 74 65 20 | 74 6f 20 74 68 65 20 75 |ndicate |to the u|
|000051f0| 70 70 65 72 20 6c 61 79 | 65 72 20 70 72 6f 74 6f |pper lay|er proto|
|00005200| 63 6f 6c 20 74 68 61 74 | 20 74 68 65 20 6c 69 6e |col that| the lin|
|00005210| 6b 20 70 72 6f 74 6f 63 | 6f 6c 20 68 61 73 20 75 |k protoc|ol has u|
|00005220| 6e 64 65 72 67 6f 6e 65 | 20 73 6f 6d 65 20 63 68 |ndergone| some ch|
|00005230| 61 6e 67 65 20 6f 66 20 | 73 74 61 74 65 2e 20 20 |ange of |state. |
|00005240| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 73 |The foll|owing is|
|00005250| 20 61 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 6f | a descr|iption o|
|00005260| 66 20 74 68 65 20 63 61 | 6c 6c 69 6e 67 20 69 6e |f the ca|lling in|
|00005270| 74 65 72 66 61 63 65 20 | 74 6f 20 74 68 65 20 74 |terface |to the t|
|00005280| 72 61 6e 73 69 74 69 6f | 6e 50 72 6f 63 2e 0d 75 |ransitio|nProc..u|
|00005290| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 4c 61 70 |nsigned |long Lap|
|000052a0| 54 72 61 6e 73 69 74 69 | 6f 6e 28 75 6e 73 69 67 |Transiti|on(unsig|
|000052b0| 6e 65 64 20 6c 6f 6e 67 | 20 65 76 65 6e 74 29 0d |ned long| event).|
|000052c0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 61 72 |The foll|owing ar|
|000052d0| 65 20 74 68 65 20 76 61 | 6c 75 65 73 20 74 68 61 |e the va|lues tha|
|000052e0| 74 20 74 68 65 20 65 76 | 65 6e 74 20 66 69 65 6c |t the ev|ent fiel|
|000052f0| 64 20 63 61 6e 20 68 61 | 76 65 3a 0d 30 09 54 68 |d can ha|ve:.0.Th|
|00005300| 65 20 6c 69 6e 6b 20 6c | 65 76 65 6c 20 64 72 69 |e link l|evel dri|
|00005310| 76 65 72 20 68 61 73 20 | 62 65 65 6e 20 6f 70 65 |ver has |been ope|
|00005320| 6e 65 64 0d 31 09 54 68 | 69 73 20 76 61 6c 75 65 |ned.1.Th|is value|
|00005330| 20 69 73 20 6e 6f 74 20 | 75 73 65 64 0d 32 09 54 | is not |used.2.T|
|00005340| 68 65 20 6c 69 6e 6b 20 | 6c 65 76 65 6c 20 64 72 |he link |level dr|
|00005350| 69 76 65 72 20 68 61 73 | 20 63 6c 6f 73 65 64 0d |iver has| closed.|
|00005360| 33 09 54 68 65 20 64 72 | 69 76 65 72 20 69 73 20 |3.The dr|iver is |
|00005370| 61 73 6b 69 6e 67 20 74 | 68 65 20 75 70 70 65 72 |asking t|he upper|
|00005380| 20 6c 61 79 65 72 20 70 | 72 6f 74 6f 63 6f 6c 20 | layer p|rotocol |
|00005390| 69 66 20 69 74 20 69 73 | 20 61 6c 6c 20 72 69 67 |if it is| all rig|
|000053a0| 68 74 20 74 6f 20 63 6c | 6f 73 65 20 74 68 65 20 |ht to cl|ose the |
|000053b0| 4c 41 50 3b 20 69 66 20 | 61 20 09 6e 6f 6e 7a 65 |LAP; if |a .nonze|
|000053c0| 72 6f 20 76 61 6c 75 65 | 20 69 73 20 72 65 74 75 |ro value| is retu|
|000053d0| 72 6e 65 64 2c 20 74 68 | 65 20 75 70 70 65 72 20 |rned, th|e upper |
|000053e0| 6c 61 79 65 72 20 70 72 | 6f 74 6f 63 6f 6c 20 68 |layer pr|otocol h|
|000053f0| 61 73 20 64 65 6e 69 65 | 64 20 74 68 65 20 63 6c |as denie|d the cl|
|00005400| 6f 73 65 0d 34 09 54 68 | 65 20 64 72 69 76 65 72 |ose.4.Th|e driver|
|00005410| 20 77 61 73 20 64 65 6e | 69 65 64 20 61 20 63 6c | was den|ied a cl|
|00005420| 6f 73 65 20 72 65 71 75 | 65 73 74 20 62 79 20 61 |ose requ|est by a|
|00005430| 6e 6f 74 68 65 72 20 75 | 70 70 65 72 20 6c 61 79 |nother u|pper lay|
|00005440| 65 72 20 70 72 6f 74 6f | 63 6f 6c 0d 57 68 65 6e |er proto|col.When|
|00005450| 20 4d 61 63 54 43 50 20 | 69 73 20 63 61 6c 6c 65 | MacTCP |is calle|
|00005460| 64 20 77 69 74 68 20 74 | 68 65 20 6c 61 70 20 6f |d with t|he lap o|
|00005470| 70 65 6e 65 64 20 74 72 | 61 6e 73 69 74 69 6f 6e |pened tr|ansition|
|00005480| 20 65 76 65 6e 74 20 61 | 66 74 65 72 20 74 68 65 | event a|fter the|
|00005490| 20 64 72 69 76 65 72 20 | 68 61 73 20 62 65 65 6e | driver |has been|
|000054a0| 20 63 61 6c 6c 65 64 20 | 77 69 74 68 20 74 68 65 | called |with the|
|000054b0| 20 6c 61 70 20 63 6c 6f | 73 65 64 20 74 72 61 6e | lap clo|sed tran|
|000054c0| 73 69 74 69 6f 6e 20 65 | 76 65 6e 74 20 74 68 65 |sition e|vent the|
|000054d0| 20 27 6d 64 65 76 27 20 | 77 69 6c 6c 20 62 65 20 | 'mdev' |will be |
|000054e0| 63 61 6c 6c 65 64 20 69 | 6e 20 74 68 65 20 66 6f |called i|n the fo|
|000054f0| 6c 6c 6f 77 69 6e 67 20 | 6d 61 6e 6e 65 72 2e 0d |llowing |manner..|
|00005500| 41 74 20 53 79 73 74 65 | 6d 54 61 73 6b 20 74 69 |At Syste|mTask ti|
|00005510| 6d 65 20 74 68 65 20 27 | 6d 64 65 76 27 20 69 6e |me the '|mdev' in|
|00005520| 69 74 20 63 61 6c 6c 20 | 77 69 6c 6c 20 62 65 20 |it call |will be |
|00005530| 6d 61 64 65 20 77 69 74 | 68 20 61 20 6e 69 6c 20 |made wit|h a nil |
|00005540| 76 61 6c 75 65 20 66 6f | 72 20 74 68 65 20 74 72 |value fo|r the tr|
|00005550| 61 6e 73 69 74 69 6f 6e | 50 72 6f 63 20 66 6f 6c |ansition|Proc fol|
|00005560| 6c 6f 77 65 64 20 62 79 | 20 74 68 65 20 4c 41 50 |lowed by| the LAP|
|00005570| 5f 63 6f 6e 66 69 67 75 | 72 65 20 63 61 6c 6c 2e |_configu|re call.|
|00005580| 0d 4f 53 45 72 72 20 4c | 41 50 5f 6f 70 65 6e 28 |.OSErr L|AP_open(|
|00005590| 6c 61 70 29 0d 4c 41 50 | 5f 6f 70 65 6e 20 69 73 |lap).LAP|_open is|
|000055a0| 20 6e 6f 74 20 63 75 72 | 72 65 6e 74 6c 79 20 63 | not cur|rently c|
|000055b0| 61 6c 6c 65 64 20 62 79 | 20 74 68 65 20 4d 61 63 |alled by| the Mac|
|000055c0| 54 43 50 20 64 72 69 76 | 65 72 2e 0d 4f 53 45 72 |TCP driv|er..OSEr|
|000055d0| 72 20 4c 41 50 5f 6f 70 | 65 6e 28 6c 61 70 29 0d |r LAP_op|en(lap).|
|000055e0| 73 74 72 75 63 74 20 4c | 41 50 49 6e 66 6f 20 2a |struct L|APInfo *|
|000055f0| 6c 61 70 3b 0d 7b 0d 09 | 72 65 74 75 72 6e 28 6e |lap;.{..|return(n|
|00005600| 6f 45 72 72 29 3b 0d 09 | 7d 0d 4f 53 45 72 72 20 |oErr);..|}.OSErr |
|00005610| 4c 41 50 5f 63 6c 6f 73 | 65 28 6c 61 70 29 0d 4c |LAP_clos|e(lap).L|
|00005620| 41 50 5f 63 6c 6f 73 65 | 20 69 73 20 63 61 6c 6c |AP_close| is call|
|00005630| 65 64 20 62 79 20 49 50 | 20 64 75 72 69 6e 67 20 |ed by IP| during |
|00005640| 64 72 69 76 65 72 20 63 | 6c 6f 73 69 6e 67 20 74 |driver c|losing t|
|00005650| 6f 20 63 6c 6f 73 65 20 | 74 68 65 20 4c 41 50 2e |o close |the LAP.|
|00005660| 20 20 4c 41 50 5f 63 6c | 6f 73 65 20 69 73 20 63 | LAP_cl|ose is c|
|00005670| 61 6c 6c 65 64 20 61 74 | 20 74 68 65 20 61 70 70 |alled at| the app|
|00005680| 6c 69 63 61 74 69 6f 6e | 20 6c 65 76 65 6c 20 6f |lication| level o|
|00005690| 72 20 73 79 73 74 65 6d | 20 74 61 73 6b 20 74 69 |r system| task ti|
|000056a0| 6d 65 2e 0d 4f 53 45 72 | 72 20 4c 41 50 5f 63 6c |me..OSEr|r LAP_cl|
|000056b0| 6f 73 65 28 6c 61 70 29 | 0d 73 74 72 75 63 74 20 |ose(lap)|.struct |
|000056c0| 4c 41 50 49 6e 66 6f 20 | 2a 6c 61 70 3b 0d 7b 0d |LAPInfo |*lap;.{.|
|000056d0| 09 2f 2a 20 63 6c 6f 73 | 65 20 68 61 72 64 77 61 |./* clos|e hardwa|
|000056e0| 72 65 20 64 72 69 76 65 | 72 2c 20 65 74 63 2e 20 |re drive|r, etc. |
|000056f0| 2a 2f 0d 09 72 65 74 75 | 72 6e 28 6e 6f 45 72 72 |*/..retu|rn(noErr|
|00005700| 29 3b 0d 09 7d 0d 76 6f | 69 64 50 72 6f 63 50 74 |);..}.vo|idProcPt|
|00005710| 72 20 4c 41 50 5f 75 6e | 6c 6f 61 64 28 6c 61 70 |r LAP_un|load(lap|
|00005720| 0d 4c 41 50 5f 75 6e 6c | 6f 61 64 20 69 73 20 63 |.LAP_unl|oad is c|
|00005730| 61 6c 6c 65 64 20 62 79 | 20 49 50 20 64 75 72 69 |alled by| IP duri|
|00005740| 6e 67 20 64 72 69 76 65 | 72 20 72 65 73 65 74 69 |ng drive|r reseti|
|00005750| 6e 67 20 74 6f 20 72 65 | 73 65 74 20 74 68 65 20 |ng to re|set the |
|00005760| 4c 41 50 20 62 65 66 6f | 72 65 20 69 74 20 69 73 |LAP befo|re it is|
|00005770| 20 6f 70 65 6e 65 64 0d | 4f 53 45 72 72 20 4c 41 | opened.|OSErr LA|
|00005780| 50 5f 55 6e 6c 6f 61 64 | 28 6c 61 70 29 0d 73 74 |P_Unload|(lap).st|
|00005790| 72 75 63 74 20 4c 41 50 | 49 6e 66 6f 20 2a 6c 61 |ruct LAP|Info *la|
|000057a0| 70 3b 0d 7b 09 0d 09 44 | 69 73 70 6f 73 50 74 72 |p;.{...D|isposPtr|
|000057b0| 28 28 50 74 72 29 6c 61 | 70 29 3b 0d 09 72 65 74 |((Ptr)la|p);..ret|
|000057c0| 75 72 6e 28 6e 6f 45 72 | 72 29 3b 0d 09 7d 0d 4f |urn(noEr|r);..}.O|
|000057d0| 53 45 72 72 20 4c 41 50 | 5f 61 74 74 61 63 68 50 |SErr LAP|_attachP|
|000057e0| 48 28 6c 61 70 2c 20 70 | 74 72 29 0d 4c 41 50 5f |H(lap, p|tr).LAP_|
|000057f0| 61 74 74 61 63 68 50 48 | 20 69 73 20 63 61 6c 6c |attachPH| is call|
|00005800| 65 64 20 62 79 20 49 50 | 20 74 6f 20 73 70 65 63 |ed by IP| to spec|
|00005810| 69 66 79 20 74 68 65 20 | 61 64 64 72 65 73 73 20 |ify the |address |
|00005820| 6f 66 20 74 68 65 20 49 | 50 20 70 61 63 6b 65 74 |of the I|P packet|
|00005830| 20 72 65 63 65 70 74 69 | 6f 6e 20 72 6f 75 74 69 | recepti|on routi|
|00005840| 6e 65 2e 20 20 49 74 20 | 69 73 20 61 73 73 75 6d |ne. It |is assum|
|00005850| 65 64 20 74 68 61 74 20 | 74 68 65 20 4c 41 50 20 |ed that |the LAP |
|00005860| 6b 6e 6f 77 73 20 68 6f | 77 20 49 50 20 64 61 74 |knows ho|w IP dat|
|00005870| 61 67 72 61 6d 73 20 61 | 72 65 20 65 6e 63 61 70 |agrams a|re encap|
|00005880| 73 75 6c 61 74 65 64 20 | 6f 6e 20 74 68 65 20 6c |sulated |on the l|
|00005890| 69 6e 6b 2e 20 4c 41 50 | 5f 61 74 74 61 63 68 50 |ink. LAP|_attachP|
|000058a0| 48 20 69 73 20 6f 6e 6c | 79 20 63 61 6c 6c 65 64 |H is onl|y called|
|000058b0| 20 61 74 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | at appl|ication |
|000058c0| 6c 65 76 65 6c 20 6f 72 | 20 73 79 73 74 65 6d 20 |level or| system |
|000058d0| 74 61 73 6b 20 74 69 6d | 65 2e 0d 4f 53 45 72 72 |task tim|e..OSErr|
|000058e0| 20 4c 41 50 5f 61 74 74 | 61 63 68 50 48 28 6c 61 | LAP_att|achPH(la|
|000058f0| 70 2c 20 70 74 72 29 0d | 73 74 72 75 63 74 20 4c |p, ptr).|struct L|
|00005900| 41 50 49 6e 66 6f 20 2a | 6c 61 70 3b 0d 49 50 50 |APInfo *|lap;.IPP|
|00005910| 48 50 72 6f 63 20 70 74 | 72 3b 0d 7b 0d 09 6c 61 |HProc pt|r;.{..la|
|00005920| 70 2d 3e 69 70 5f 70 68 | 20 3d 20 70 74 72 3b 0d |p->ip_ph| = ptr;.|
|00005930| 09 72 65 74 75 72 6e 28 | 6e 6f 45 72 72 29 3b 0d |.return(|noErr);.|
|00005940| 09 7d 0d 74 79 70 65 64 | 65 66 20 76 6f 69 64 20 |.}.typed|ef void |
|00005950| 28 2a 49 50 50 48 50 72 | 6f 63 29 20 28 73 74 72 |(*IPPHPr|oc) (str|
|00005960| 75 63 74 20 72 64 53 74 | 72 75 63 74 20 2a 72 64 |uct rdSt|ruct *rd|
|00005970| 73 29 3b 0d 73 74 72 75 | 63 74 20 72 64 53 74 72 |s);.stru|ct rdStr|
|00005980| 75 63 74 20 7b 0d 09 50 | 72 6f 63 50 74 72 09 70 |uct {..P|rocPtr.p|
|00005990| 68 5f 72 70 3b 09 2f 2a | 20 70 6f 69 6e 74 65 72 |h_rp;./*| pointer|
|000059a0| 20 74 6f 20 22 52 65 61 | 64 50 61 63 6b 65 74 22 | to "Rea|dPacket"|
|000059b0| 20 72 6f 75 74 69 6e 65 | 20 28 61 34 29 20 2a 2f | routine| (a4) */|
|000059c0| 0d 09 50 72 6f 63 50 74 | 72 09 70 68 5f 72 72 3b |..ProcPt|r.ph_rr;|
|000059d0| 09 2f 2a 20 70 6f 69 6e | 74 65 72 20 74 6f 20 22 |./* poin|ter to "|
|000059e0| 52 65 61 64 52 65 73 74 | 22 20 72 6f 75 74 69 6e |ReadRest|" routin|
|000059f0| 65 20 32 28 61 34 29 20 | 2a 2f 0d 09 6c 6f 6e 67 |e 2(a4) |*/..long|
|00005a00| 09 70 68 5f 62 79 74 65 | 73 6c 65 66 74 3b 09 2f |.ph_byte|sleft;./|
|00005a10| 2a 20 6e 75 6d 62 65 72 | 20 6f 66 20 62 79 74 65 |* number| of byte|
|00005a20| 73 20 6c 65 66 74 20 74 | 6f 20 72 65 61 64 20 2a |s left t|o read *|
|00005a30| 2f 0d 09 75 6e 69 6f 6e | 20 7b 0d 09 2f 2a 20 73 |/..union| {../* s|
|00005a40| 74 6f 72 61 67 65 20 66 | 6f 72 20 73 74 61 6e 64 |torage f|or stand|
|00005a50| 61 72 64 20 41 70 70 6c | 65 54 61 6c 6b 20 4c 41 |ard Appl|eTalk LA|
|00005a60| 50 20 70 72 6f 74 6f 63 | 6f 6c 20 68 61 6e 64 6c |P protoc|ol handl|
|00005a70| 65 72 20 2a 2f 0d 09 09 | 73 74 72 75 63 74 20 7b |er */...|struct {|
|00005a80| 0d 09 09 09 6c 6f 6e 67 | 20 09 70 68 62 5f 61 34 |....long| .phb_a4|
|00005a90| 3b 20 20 20 2f 2a 20 75 | 73 65 64 20 62 79 20 64 |; /* u|sed by d|
|00005aa0| 72 69 76 65 72 20 2a 2f | 0d 09 09 09 6c 6f 6e 67 |river */|....long|
|00005ab0| 09 70 68 62 5f 61 30 3b | 20 20 20 2f 2a 20 75 73 |.phb_a0;| /* us|
|00005ac0| 65 64 20 62 79 20 64 72 | 69 76 65 72 20 2a 2f 0d |ed by dr|iver */.|
|00005ad0| 09 09 09 6c 6f 6e 67 09 | 70 68 62 5f 61 31 3b 20 |...long.|phb_a1; |
|00005ae0| 20 20 2f 2a 20 75 73 65 | 64 20 62 79 20 64 72 69 | /* use|d by dri|
|00005af0| 76 65 72 20 2a 2f 0d 09 | 09 09 6c 6f 6e 67 09 70 |ver */..|..long.p|
|00005b00| 68 62 5f 61 32 3b 20 20 | 20 2f 2a 20 75 73 65 64 |hb_a2; | /* used|
|00005b10| 20 62 79 20 64 72 69 76 | 65 72 20 2a 2f 0d 09 09 | by driv|er */...|
|00005b20| 09 7d 20 70 68 62 3b 0d | 09 09 2f 2a 20 73 74 6f |.} phb;.|../* sto|
|00005b30| 72 61 67 65 20 66 6f 72 | 20 61 20 62 75 66 66 65 |rage for| a buffe|
|00005b40| 72 65 64 20 4c 41 50 20 | 69 6e 74 65 72 66 61 63 |red LAP |interfac|
|00005b50| 65 20 2a 2f 0d 09 09 73 | 74 72 75 63 74 20 7b 0d |e */...s|truct {.|
|00005b60| 09 09 09 62 5f 38 20 2a | 09 6c 6e 62 5f 70 74 72 |...b_8 *|.lnb_ptr|
|00005b70| 3b 2f 2a 20 70 6f 69 6e | 74 65 72 20 74 6f 20 6e |;/* poin|ter to n|
|00005b80| 65 78 74 20 62 79 74 65 | 20 74 6f 20 67 65 74 20 |ext byte| to get |
|00005b90| 66 72 6f 6d 20 62 75 66 | 66 65 72 20 2a 2f 0d 09 |from buf|fer */..|
|00005ba0| 09 09 7d 20 6c 6e 62 3b | 0d 09 09 2f 2a 20 73 74 |..} lnb;|.../* st|
|00005bb0| 6f 72 61 67 65 20 66 6f | 72 20 72 65 61 73 73 65 |orage fo|r reasse|
|00005bc0| 6d 62 6c 65 64 20 49 50 | 20 70 61 63 6b 65 74 20 |mbled IP| packet |
|00005bd0| 2a 2f 0d 09 09 73 74 72 | 75 63 74 20 7b 0d 09 73 |*/...str|uct {..s|
|00005be0| 74 72 75 63 74 20 66 72 | 61 67 6d 65 6e 74 09 2a |truct fr|agment.*|
|00005bf0| 72 73 6d 62 5f 66 72 61 | 67 62 75 66 66 65 72 3b |rsmb_fra|gbuffer;|
|00005c00| 09 2f 2a 20 70 6f 69 6e | 74 65 72 20 74 6f 20 66 |./* poin|ter to f|
|00005c10| 72 61 67 6d 65 6e 74 20 | 64 61 74 61 20 62 75 66 |ragment |data buf|
|00005c20| 66 65 72 20 2a 2f 0d 09 | 62 5f 38 20 2a 09 72 73 |fer */..|b_8 *.rs|
|00005c30| 6d 62 5f 70 74 72 3b 09 | 2f 2a 20 70 6f 69 6e 74 |mb_ptr;.|/* point|
|00005c40| 65 72 20 74 6f 20 6e 65 | 78 74 20 62 79 74 65 20 |er to ne|xt byte |
|00005c50| 74 6f 20 67 65 74 20 66 | 72 6f 6d 20 62 75 66 66 |to get f|rom buff|
|00005c60| 65 72 20 2a 2f 0d 09 69 | 6e 74 09 72 73 6d 62 5f |er */..i|nt.rsmb_|
|00005c70| 62 79 74 65 73 6c 65 66 | 74 3b 09 2f 2a 20 6e 75 |byteslef|t;./* nu|
|00005c80| 6d 62 65 72 20 6f 66 20 | 62 79 74 65 73 20 6c 65 |mber of |bytes le|
|00005c90| 66 74 20 69 6e 20 74 68 | 69 73 20 62 75 66 66 65 |ft in th|is buffe|
|00005ca0| 72 20 2a 2f 0d 09 69 6e | 74 09 72 73 6d 62 5f 62 |r */..in|t.rsmb_b|
|00005cb0| 79 74 65 6f 66 66 73 65 | 74 3b 09 2f 2a 20 6f 66 |yteoffse|t;./* of|
|00005cc0| 66 73 65 74 20 6f 66 20 | 6e 65 78 74 20 62 79 74 |fset of |next byt|
|00005cd0| 65 20 69 6e 20 72 73 6d | d5 64 20 70 6b 74 20 2a |e in rsm|.d pkt *|
|00005ce0| 2f 0d 09 7d 20 72 73 6d | 3b 0d 09 7d 20 72 64 73 |/..} rsm|;..} rds|
|00005cf0| 70 61 72 6d 3b 0d 09 42 | 6f 6f 6c 65 61 6e 09 6c |parm;..B|oolean.l|
|00005d00| 61 70 42 72 6f 61 64 63 | 61 73 74 3b 09 2f 2a 20 |apBroadc|ast;./* |
|00005d10| 4c 41 50 2d 6c 65 76 65 | 6c 20 62 72 6f 61 64 63 |LAP-leve|l broadc|
|00005d20| 61 73 74 20 2a 2f 0d 09 | 42 6f 6f 6c 65 61 6e 09 |ast */..|Boolean.|
|00005d30| 69 70 42 72 6f 61 64 63 | 61 73 74 3b 09 2f 2a 20 |ipBroadc|ast;./* |
|00005d40| 49 50 2d 6c 65 76 65 6c | 20 62 72 6f 61 64 63 61 |IP-level| broadca|
|00005d50| 73 74 20 2a 2f 0d 09 73 | 74 72 75 63 74 20 4c 41 |st */..s|truct LA|
|00005d60| 50 49 6e 66 6f 09 2a 6c | 61 70 3b 09 2f 2a 20 69 |PInfo.*l|ap;./* i|
|00005d70| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 62 6f 75 74 |nformati|on about|
|00005d80| 20 72 65 63 65 69 76 69 | 6e 67 20 4c 41 50 20 2a | receivi|ng LAP *|
|00005d90| 2f 0d 09 73 74 72 75 63 | 74 20 77 64 73 45 6e 74 |/..struc|t wdsEnt|
|00005da0| 72 79 09 6c 61 70 68 64 | 72 3b 09 2f 2a 20 6c 6f |ry.laphd|r;./* lo|
|00005db0| 63 61 6c 20 6e 65 74 20 | 68 65 61 64 65 72 20 2a |cal net |header *|
|00005dc0| 2f 0d 09 73 74 72 75 63 | 74 20 49 50 77 64 73 45 |/..struc|t IPwdsE|
|00005dd0| 6e 74 72 79 09 69 70 3b | 09 2f 2a 20 69 70 20 68 |ntry.ip;|./* ip h|
|00005de0| 65 61 64 65 72 20 2a 2f | 0d 09 73 74 72 75 63 74 |eader */|..struct|
|00005df0| 20 77 64 73 45 6e 74 72 | 79 09 74 70 3b 09 2f 2a | wdsEntr|y.tp;./*|
|00005e00| 20 54 43 50 2f 55 44 50 | 20 6f 72 20 49 43 4d 50 | TCP/UDP| or ICMP|
|00005e10| 20 68 65 61 64 65 72 20 | 2a 2f 0d 09 73 74 72 75 | header |*/..stru|
|00005e20| 63 74 20 77 64 73 45 6e | 74 72 79 09 64 61 74 61 |ct wdsEn|try.data|
|00005e30| 3b 09 2f 2a 20 54 43 50 | 2f 55 44 50 20 64 61 74 |;./* TCP|/UDP dat|
|00005e40| 61 20 2a 2f 0d 7d 3b 0d | 4f 53 45 72 72 20 4c 41 |a */.};.|OSErr LA|
|00005e50| 50 5f 64 65 74 61 63 68 | 50 48 28 6c 61 70 29 0d |P_detach|PH(lap).|
|00005e60| 4c 41 50 5f 64 65 74 61 | 63 68 50 48 20 69 73 20 |LAP_deta|chPH is |
|00005e70| 63 61 6c 6c 65 64 20 62 | 79 20 49 50 20 64 75 72 |called b|y IP dur|
|00005e80| 69 6e 67 20 64 72 69 76 | 65 72 20 63 6c 6f 73 69 |ing driv|er closi|
|00005e90| 6e 67 20 74 6f 20 72 65 | 6c 65 61 73 65 20 74 68 |ng to re|lease th|
|00005ea0| 65 20 62 69 6e 64 69 6e | 67 20 74 6f 20 74 68 65 |e bindin|g to the|
|00005eb0| 20 49 50 20 70 61 63 6b | 65 74 20 72 65 63 65 70 | IP pack|et recep|
|00005ec0| 74 69 6f 6e 20 72 6f 75 | 74 69 6e 65 2e 20 20 4c |tion rou|tine. L|
|00005ed0| 41 50 5f 64 65 74 61 63 | 68 50 48 20 69 73 20 6f |AP_detac|hPH is o|
|00005ee0| 6e 6c 79 20 63 61 6c 6c | 65 64 20 61 74 20 74 68 |nly call|ed at th|
|00005ef0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 6c 65 |e applic|ation le|
|00005f00| 76 65 6c 20 6f 72 20 73 | 79 73 74 65 6d 20 74 61 |vel or s|ystem ta|
|00005f10| 73 6b 20 74 69 6d 65 2e | 0d 4f 53 45 72 72 20 4c |sk time.|.OSErr L|
|00005f20| 41 50 5f 64 65 74 61 63 | 68 50 48 28 6c 61 70 29 |AP_detac|hPH(lap)|
|00005f30| 0d 73 74 72 75 63 74 20 | 4c 41 50 49 6e 66 6f 20 |.struct |LAPInfo |
|00005f40| 2a 6c 61 70 3b 0d 7b 0d | 09 6c 61 70 2d 3e 69 70 |*lap;.{.|.lap->ip|
|00005f50| 5f 70 68 20 3d 20 6e 69 | 6c 3b 0d 09 72 65 74 75 |_ph = ni|l;..retu|
|00005f60| 72 6e 28 6e 6f 45 72 72 | 29 3b 0d 09 7d 0d 4f 53 |rn(noErr|);..}.OS|
|00005f70| 45 72 72 20 4c 41 50 5f | 77 72 69 74 65 28 6c 61 |Err LAP_|write(la|
|00005f80| 70 2c 20 64 65 73 74 2c | 20 69 70 62 29 0d 4c 41 |p, dest,| ipb).LA|
|00005f90| 50 5f 77 72 69 74 65 20 | 69 73 20 63 61 6c 6c 65 |P_write |is calle|
|00005fa0| 64 20 62 79 20 49 50 20 | 74 6f 20 69 6e 69 74 69 |d by IP |to initi|
|00005fb0| 61 74 65 20 74 68 65 20 | 74 72 61 6e 73 6d 69 73 |ate the |transmis|
|00005fc0| 73 69 6f 6e 20 6f 66 20 | 61 20 70 61 63 6b 65 74 |sion of |a packet|
|00005fd0| 2e 20 20 50 61 63 6b 65 | 74 73 20 61 72 65 20 66 |. Packe|ts are f|
|00005fe0| 6f 72 6d 61 74 74 65 64 | 20 61 73 20 61 20 4d 61 |ormatted| as a Ma|
|00005ff0| 63 69 6e 74 6f 73 68 20 | 4f 70 65 72 61 74 69 6e |cintosh |Operatin|
|00006000| 67 20 53 79 73 74 65 6d | 20 49 2f 4f 20 70 61 72 |g System| I/O par|
|00006010| 61 6d 65 74 65 72 20 62 | 6c 6f 63 6b 20 66 6f 6c |ameter b|lock fol|
|00006020| 6c 6f 77 65 64 20 62 79 | 20 61 20 77 72 69 74 65 |lowed by| a write|
|00006030| 20 64 65 73 63 72 69 70 | 74 6f 72 20 73 74 72 75 | descrip|tor stru|
|00006040| 63 74 75 72 65 20 28 57 | 44 53 29 2e 20 20 49 50 |cture (W|DS). IP|
|00006050| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 72 | automat|ically r|
|00006060| 65 73 65 72 76 65 73 20 | 74 68 65 20 66 69 72 73 |eserves |the firs|
|00006070| 74 20 57 44 53 20 65 6e | 74 72 79 20 66 6f 72 20 |t WDS en|try for |
|00006080| 74 68 65 20 4c 41 50 20 | 68 65 61 64 65 72 2e 20 |the LAP |header. |
|00006090| 20 49 6e 20 4d 61 63 54 | 43 50 20 31 2e 31 2c 20 | In MacT|CP 1.1, |
|000060a0| 74 68 69 73 20 57 44 53 | 20 65 6e 74 72 79 20 70 |this WDS| entry p|
|000060b0| 6f 69 6e 74 73 20 74 6f | 20 61 6e 20 61 72 65 61 |oints to| an area|
|000060c0| 20 74 68 61 74 20 69 73 | 20 61 20 6d 61 78 69 6d | that is| a maxim|
|000060d0| 75 6d 20 6f 66 20 34 38 | 20 62 79 74 65 73 20 6c |um of 48| bytes l|
|000060e0| 6f 6e 67 2e 20 20 49 66 | 20 61 20 6c 61 72 67 65 |ong. If| a large|
|000060f0| 72 20 4c 41 50 20 68 65 | 61 64 65 72 20 69 73 20 |r LAP he|ader is |
|00006100| 6e 65 65 64 65 64 2c 20 | 74 68 65 20 4c 41 50 20 |needed, |the LAP |
|00006110| 77 69 6c 6c 20 6e 65 65 | 64 20 74 6f 20 70 72 6f |will nee|d to pro|
|00006120| 76 69 64 65 20 73 70 61 | 63 65 20 66 72 6f 6d 20 |vide spa|ce from |
|00006130| 69 74 73 20 6f 77 6e 20 | 62 75 66 66 65 72 73 2e |its own |buffers.|
|00006140| 20 20 54 68 65 20 4c 41 | 50 5f 77 72 69 74 65 20 | The LA|P_write |
|00006150| 69 73 20 72 65 73 70 6f | 6e 73 69 62 6c 65 20 66 |is respo|nsible f|
|00006160| 6f 72 20 68 61 6e 64 6c | 69 6e 67 20 61 6c 6c 20 |or handl|ing all |
|00006170| 61 73 70 65 63 74 73 20 | 6f 66 20 74 72 61 6e 73 |aspects |of trans|
|00006180| 6c 61 74 69 6e 67 20 66 | 72 6f 6d 20 61 6e 20 49 |lating f|rom an I|
|00006190| 50 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 61 64 |P destin|ation ad|
|000061a0| 64 72 65 73 73 20 74 6f | 20 69 74 73 20 6c 6f 63 |dress to| its loc|
|000061b0| 61 6c 20 6e 65 74 77 6f | 72 6b 20 64 65 73 74 69 |al netwo|rk desti|
|000061c0| 6e 61 74 69 6f 6e 20 61 | 64 64 72 65 73 73 2e 20 |nation a|ddress. |
|000061d0| 20 54 68 69 73 20 69 6e | 63 6c 75 64 65 73 20 63 | This in|cludes c|
|000061e0| 6f 72 72 65 63 74 6c 79 | 20 69 6e 74 65 72 70 72 |orrectly| interpr|
|000061f0| 65 74 74 69 6e 67 20 74 | 68 65 20 49 50 20 62 72 |etting t|he IP br|
|00006200| 6f 61 64 63 61 73 74 20 | 61 64 64 72 65 73 73 20 |oadcast |address |
|00006210| 28 4d 61 63 54 43 50 20 | 6f 6e 6c 79 20 73 65 6e |(MacTCP |only sen|
|00006220| 64 73 20 74 68 65 20 31 | d5 73 20 66 6f 72 6d 29 |ds the 1|.s form)|
|00006230| 20 61 6e 64 20 68 61 6e | 64 6c 69 6e 67 20 70 61 | and han|dling pa|
|00006240| 63 6b 65 74 73 20 61 64 | 64 72 65 73 73 65 64 20 |ckets ad|dressed |
|00006250| 74 6f 20 74 68 65 20 73 | 61 6d 65 20 6e 6f 64 65 |to the s|ame node|
|00006260| 20 69 66 20 74 68 65 20 | 6c 69 6e 6b 20 64 6f 65 | if the |link doe|
|00006270| 73 20 6e 6f 74 20 64 6f | 20 6c 6f 6f 70 62 61 63 |s not do| loopbac|
|00006280| 6b 2e 20 20 4c 41 50 5f | 77 72 69 74 65 20 6d 61 |k. LAP_|write ma|
|00006290| 79 20 62 65 20 63 61 6c | 6c 65 64 20 61 74 20 69 |y be cal|led at i|
|000062a0| 6e 74 65 72 72 75 70 74 | 20 6c 65 76 65 6c 20 61 |nterrupt| level a|
|000062b0| 6e 64 20 63 61 6e 6e 6f | 74 20 6d 61 6b 65 20 73 |nd canno|t make s|
|000062c0| 79 6e 63 68 72 6f 6e 6f | 75 73 20 73 79 73 74 65 |ynchrono|us syste|
|000062d0| 6d 20 63 61 6c 6c 73 2e | 20 20 4c 41 50 5f 77 72 |m calls.| LAP_wr|
|000062e0| 69 74 65 20 6d 61 79 20 | 72 65 74 75 72 6e 20 61 |ite may |return a|
|000062f0| 20 6e 65 67 61 74 69 76 | 65 20 65 72 72 6f 72 20 | negativ|e error |
|00006300| 63 6f 64 65 20 75 70 6f | 6e 20 65 72 72 6f 72 3b |code upo|n error;|
|00006310| 20 6f 74 68 65 72 77 69 | 73 65 20 69 74 20 6d 75 | otherwi|se it mu|
|00006320| 73 74 20 72 65 74 75 72 | 6e 20 7a 65 72 6f 2e 0d |st retur|n zero..|
|00006330| 4f 53 45 72 72 20 4c 41 | 50 5f 77 72 69 74 65 28 |OSErr LA|P_write(|
|00006340| 6c 61 70 2c 20 64 65 73 | 74 2c 20 69 70 62 29 0d |lap, des|t, ipb).|
|00006350| 73 74 72 75 63 74 20 4c | 41 50 49 6e 66 6f 20 2a |struct L|APInfo *|
|00006360| 6c 61 70 3b 0d 69 70 5f | 61 64 64 72 20 64 65 73 |lap;.ip_|addr des|
|00006370| 74 3b 0d 73 74 72 75 63 | 74 20 69 70 62 75 66 20 |t;.struc|t ipbuf |
|00006380| 2a 69 70 62 3b 0d 7b 0d | 09 73 74 72 75 63 74 20 |*ipb;.{.|.struct |
|00006390| 4c 41 50 5f 68 65 61 64 | 65 72 20 2a 65 6e 5f 68 |LAP_head|er *en_h|
|000063a0| 64 72 3b 0d 09 73 74 72 | 75 63 74 20 61 72 70 5f |dr;..str|uct arp_|
|000063b0| 69 6e 66 6f 20 2a 61 72 | 70 3b 0d 09 73 74 72 75 |info *ar|p;..stru|
|000063c0| 63 74 20 4c 41 50 5f 61 | 64 64 72 20 2a 65 6e 61 |ct LAP_a|ddr *ena|
|000063d0| 3b 0d 09 4f 53 45 72 72 | 20 72 63 3b 0d 09 0d 09 |;..OSErr| rc;....|
|000063e0| 65 6e 5f 68 64 72 20 3d | 20 28 73 74 72 75 63 74 |en_hdr =| (struct|
|000063f0| 20 4c 41 50 5f 68 65 61 | 64 65 72 20 2a 29 69 70 | LAP_hea|der *)ip|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.